in MXRoyale, setting enabled=false should immediately cause loss of focus
- Dominant language
- ActionScript
- Stars
- 380
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.