You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2013/05/21 20:25:12 UTC
[05/12] git commit: [flex-sdk] [refs/heads/develop] - Fix FLEX-33505.
TitleWindow close button does not cause components to lose focus and save
state. Now it will.
Fix FLEX-33505. TitleWindow close button does not cause components to lose focus and save state. Now it will.
Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/9010f8d0
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/9010f8d0
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/9010f8d0
Branch: refs/heads/develop
Commit: 9010f8d05b3f72e631381236a2639cb5d928c981
Parents: 7db1506
Author: Alex Harui <ah...@apache.org>
Authored: Sun May 19 21:24:04 2013 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue May 21 11:24:41 2013 -0700
----------------------------------------------------------------------
.../spark/src/spark/components/TitleWindow.as | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/9010f8d0/frameworks/projects/spark/src/spark/components/TitleWindow.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/TitleWindow.as b/frameworks/projects/spark/src/spark/components/TitleWindow.as
index ee25072..e7f4d28 100644
--- a/frameworks/projects/spark/src/spark/components/TitleWindow.as
+++ b/frameworks/projects/spark/src/spark/components/TitleWindow.as
@@ -471,6 +471,14 @@ public class TitleWindow extends Panel
*/
protected function closeButton_clickHandler(event:MouseEvent):void
{
+ var child:DisplayObject = getFocus() as DisplayObject;
+ if (child && contains(child))
+ {
+ // make sure any internal component that has focus
+ // loses focus so it commits changes internally
+ if (stage)
+ stage.focus = null;
+ }
dispatchEvent(new CloseEvent(CloseEvent.CLOSE));
}