greg-dove opened a new issue #862:
URL: https://github.com/apache/royale-asjs/issues/862


   Setting enabled=false should immediately cause loss of focus at the level of 
the component or for any 'internal' component that currently has focus if the 
disabled class is a container. This was not happening in some legacy code that 
I am working with when porting using MXRoyale.
   
   For MXRoyale, I propose the following at the end of the UIComponent 
'enabled' setter:
   
   JS specific:
   `if (!_enabled && document.activeElement && 
this.element.contains(document.activeElement)) document.activeElement.blur();
   `
   I tested this and I think it works ok for js (so far) when used in 
UIComponent. For swf, I assume it might need something similar like a focus 
check with this.contains(that) and set focus to null if true (did not think too 
deeply, but I guess there should be something already in Flex for that if it is 
needed).
   
   Potentially this functionality could be supported via the DisableBead in 
Basic... instead of just MXRoyale specific ... this is really open for 
discussion - thoughts?
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to