This is an automated email from the ASF dual-hosted git repository. alinakazi pushed a commit to branch feature/MXRoyale in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/feature/MXRoyale by this push: new 3fdcc55 Update FocusManager.as 3fdcc55 is described below commit 3fdcc55318abb005090521bb4e6abf5aa1879e8e Author: alinakazi <alinakazi1...@gmail.com> AuthorDate: Fri Aug 10 17:13:29 2018 +0500 Update FocusManager.as --- .../MXRoyale/src/main/royale/mx/managers/FocusManager.as | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/FocusManager.as b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/FocusManager.as index a5b6e10..10635a8 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/FocusManager.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/FocusManager.as @@ -2365,11 +2365,21 @@ public class FocusManager extends EventDispatcher implements IFocusManager if (target is UIComponent) target["element"].focus(); } - public function getNextFocusManagerComponent( + public function getNextFocusManagerComponent( backward:Boolean = false):IFocusManagerComponent { return null; } + public function setFocus(o:IFocusManagerComponent):void + { + // trace("FM " + this + " setting focus to " + o); + + o.setFocus(); + + if (hasEventListener("setFocus")) + dispatchEvent(new Event("setFocus")); + // trace("FM set focus"); + } } }