[flexcoders] Re: MAC : TextInput focus

2010-01-16 Thread mitchgrrt
I tried the same example and it worked in Firefox on the Mac but not in
Safari.  In Safari the text input looks like it has focus - it has a
blue glowing border around it - but I can't type in it without first
clicking the mouse.  Both of the lines theInput.stage.focus = theInput
and theInput.setFocus() work in Firefox, neither work in Safari.

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical
 applicationComplete=onApplicationComplete() paddingLeft=20
paddingTop=20 horizontalAlign=left

 mx:Script
 ![CDATA[
 private function onApplicationComplete():void {
callLater(setFocusOnUserName);
 }

 private function setFocusOnUserName():void {
 ExternalInterface.call(s = function()
{document.getElementById('+this.id+').focus(); });
 theInput.stage.focus = theInput;
 // theInput.setFocus();
 }
 ]]
 /mx:Script

 mx:Label text=user name /
 mx:TextInput id=theInput /
/mx:Application

--- In flexcoders@yahoogroups.com, emc_rcsiki emc_rcs...@... wrote:

 Alex, the following simple application gives the TextInput the focus
in
 the latest versions of IE and Firefox (IE8, Firefox 3.5) - that is, I
 can start typing right away:




[flexcoders] Re: MAC : TextInput focus

2010-01-16 Thread mitchgrrt
Here is a good discussion of the issue:
http://carrythezero.net/blog/2009/01/20/flex-textinput-focus-issues/
http://carrythezero.net/blog/2009/01/20/flex-textinput-focus-issues/

and a summary of what seems to be the problem:
http://stackoverflow.com/questions/594821/object-focus-problem-with-safa\
ri-and-chrome-browsers
http://stackoverflow.com/questions/594821/object-focus-problem-with-saf\
ari-and-chrome-browsers

It sounds like there may not be a solution now, for browsers like Safari
based on WebKit.



[flexcoders] Re: MAC : TextInput focus

2009-12-15 Thread emc_rcsiki
Alex, the following simple application gives the TextInput the focus in
the latest versions of IE and Firefox (IE8, Firefox 3.5) - that is, I
can start typing right away:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute applicationComplete=onAppComplete()
mx:Script
![CDATA[

private function onAppComplete():void
{
callLater(_setFocus);
}

private function _setFocus():void
{
ExternalInterface.call(s = function()
{document.getElementById('+this.id+').focus(); });
myTextField.stage.focus = myTextField;
}
]]
/mx:Script
mx:TextInput id=myTextField  horizontalCenter=0
verticalCenter=0/
/mx:Application

Are you saying this should do the same in Safari (Windows or Mac, it's
the most recent version of Safari), but b/c of a browser (or Flash)
issue it does not?

Thanks
Robert


--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 It is a flash/browser issue.  I'm surprised you got it working in FF. 
Maybe the latest versions have finally made it possible.  Slowly, one
browser at a time, we hope to work with the browser manufacturers to
make it so your users can just start typing, but it isn't possible on
all browsers right now.

 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui

 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of suman gayakwad
 Sent: Thursday, November 26, 2009 6:36 PM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] MAC : TextInput focus



 Alex,

  As soon as the application loads up, im getting the login
screen(TitlwWindow component) which has got three fields username,
password and domain. I'm trying to set the focus to the username field
so that user can start typing. The focus is set to username field in IE,
Firefox and also in Chrome but not in Safari browser. The weird thing
here(in Safari browser) as soon as i click on the application,(ie.
somewhere within the browser window)  the focus will be set to username
field.

 Is this browser plug-in issue or bug on Flex side ?

 Thanks,
 Suman




RE: [flexcoders] Re: MAC : TextInput focus

2009-12-15 Thread Alex Harui
Yeah.  And I'm surprised you got it working on FireFox.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of emc_rcsiki
Sent: Tuesday, December 15, 2009 5:43 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: MAC : TextInput focus



Alex, the following simple application gives the TextInput the focus in the 
latest versions of IE and Firefox (IE8, Firefox 3.5) - that is, I can start 
typing right away:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute 
applicationComplete=onAppComplete()
   mx:Script
   ![CDATA[

   private function onAppComplete():void
   {
   callLater(_setFocus);
   }

   private function _setFocus! ():void
   {
   ExternalInterface.call(s = function() 
{document.getElementById('+this.id+').focus(); });
   myTextField.stage.focus = myTextField;
   }
   ]]
   /mx:Script
   mx:TextInput id=myTextField  horizontalCenter=0 verticalCenter=0/
/mx:Application

Are you saying this should do the same in Safari (Windows or Mac, it's the most 
recent version of Safari), but b/c of a browser (or Flash) issue it does not?

Thanks
Robert


--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 It is a flash/browser issue. I'm su! rprised you got it working in FF. Maybe 
 the latest versions h! ave fina lly made it possible. Slowly, one browser at 
 a time, we hope to work with the browser manufacturers to make it so your 
 users can just start typing, but it isn't possible on all browsers right now.

 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui

 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of suman gayakwad
 Sent: Thursday, November 26, 2009 6:36 PM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] MAC : TextInput focus



 Alex,

 As soon as the application loads up, im getting the login screen(TitlwWindow 
 component) which has got three fields username, password and domain. I'm 
 trying to set the focus to the username field so that user can start typing. 
 The focus is set to username field in IE, Firefox and al! so in Chrome but 
 not in Safari browser. The weird thing here(in Safari browser) as soon as i 
 click on the application,(ie. somewhere within the browser window) the focus 
 will be set to username field.

 Is this browser plug-in issue or bug on Flex side ?

 Thanks,
 Suman