You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2020/06/12 05:47:27 UTC

[GitHub] [royale-asjs] greg-dove opened a new issue #862: in MXRoyale, setting enabled=false should immediately cause loss of focus

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:
users@infra.apache.org



[GitHub] [royale-asjs] aharui commented on issue #862: in MXRoyale, setting enabled=false should immediately cause loss of focus

Posted by GitBox <gi...@apache.org>.
aharui commented on issue #862:
URL: https://github.com/apache/royale-asjs/issues/862#issuecomment-643082013


   Seems ok for now.  I don't remember if the Flex FocusManager had a response for enableChanged.  The FM tried to always keep something in focus so might have set focus somewhere.  But unless someone actually cares about that, it may not be worth emulating that.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [royale-asjs] carlosrovira commented on issue #862: in MXRoyale, setting enabled=false should immediately cause loss of focus

Posted by GitBox <gi...@apache.org>.
carlosrovira commented on issue #862:
URL: https://github.com/apache/royale-asjs/issues/862#issuecomment-643161481


   I think this seems something to take into account at Basic level if possible since seems to me something that applies to all sets. Thanks


----------------------------------------------------------------
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:
users@infra.apache.org