Updated Branches: refs/heads/develop 2b308555b -> e014a0d05
FIX FLEX-33166 Mobile TextInput with native StageTextInput cannot be included in scrollable forms - cleanup code (removed traces) Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/e014a0d0 Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/e014a0d0 Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/e014a0d0 Branch: refs/heads/develop Commit: e014a0d057d9abe47fb1cebe3a0df307c8e44f71 Parents: 2b30855 Author: mamsellem <[email protected]> Authored: Tue Nov 19 15:47:25 2013 +0100 Committer: mamsellem <[email protected]> Committed: Tue Nov 19 15:47:25 2013 +0100 ---------------------------------------------------------------------- .../supportClasses/ScrollableStageText.as | 35 ++++++-------------- 1 file changed, 10 insertions(+), 25 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e014a0d0/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as b/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as index e65a1d9..f14cc38 100644 --- a/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as +++ b/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as @@ -423,20 +423,13 @@ public class ScrollableStageText extends UIComponent implements IStyleableEdita */ private var savedSelectionAnchorIndex:int = 0; private var savedSelectionActiveIndex:int = 0; - private var showProxy:Boolean = true; - - /* if showProxy = true; proxy is visible, and StageText is not visible - * */ - private var isEditing:Boolean = false; /* indicates whether editing is in place * */ - private var isMouseDown:Boolean = false; + private var isEditing:Boolean = false; private var invalidateProxyFlag:Boolean = false; - - //-------------------------------------------------------------------------- // // Properties @@ -667,10 +660,13 @@ public class ScrollableStageText extends UIComponent implements IStyleableEdita var sm:SystemManager = application ? application.systemManager as SystemManager : null; _densityScale = sm ? sm.densityScale : 1.0; } - return _densityScale; } + protected function get showProxy():Boolean { + return !isEditing; + } + //---------------------------------- // displayAsPassword //---------------------------------- @@ -1368,11 +1364,6 @@ public class ScrollableStageText extends UIComponent implements IStyleableEdita */ override public function setFocus():void { - // if mouse is down, let SetFocus handle the focus, otherwise it's programmatic, so assign focus - /* if (isMouseDown) - { - return; - }*/ if (stageText != null) { stageText.assignFocus(); // will trigger stageTextfocusIn @@ -1512,9 +1503,11 @@ public class ScrollableStageText extends UIComponent implements IStyleableEdita } - /** - * EDITING AND FOCUS MANAGEMENT - */ + //-------------------------------------------------------------------------- + // + // EDITING AND FOCUS MANAGEMENT + // + //-------------------------------------------------------------------------- /** * @return true if editing was actually stated,, false is already started @@ -1524,7 +1517,6 @@ public class ScrollableStageText extends UIComponent implements IStyleableEdita if (!isEditing) { isEditing = true; - showProxy = false; proxy.visible = false; updateViewPort(); stageText.visible = true; @@ -1544,7 +1536,6 @@ public class ScrollableStageText extends UIComponent implements IStyleableEdita { isEditing = false; invalidateProxy(); - showProxy = true; proxy.visible = true; stageText.visible = false; @@ -1854,10 +1845,8 @@ public class ScrollableStageText extends UIComponent implements IStyleableEdita private function touchStartingHandler(event:Event):void { // don't allow touch scrolling while editing (of the StageText will stay in place) - trace("[DEBUG] touchStartingHandler", debugId); if (isEditing) event.preventDefault(); - } protected function stageText_changeHandler(event:Event):void @@ -1886,7 +1875,6 @@ public class ScrollableStageText extends UIComponent implements IStyleableEdita private function stageText_focusInHandler(event:FocusEvent):void { if (startTextEdit()){ - trace("[DEBUG] stageText focus IN:", debugId); // Focus events are documented as bubbling. However, all events coming // from StageText are set to not bubble. So we need to create an // appropriate bubbling event here. @@ -1898,7 +1886,6 @@ public class ScrollableStageText extends UIComponent implements IStyleableEdita private function stageText_focusOutHandler(event:FocusEvent):void { if (endTextEdit()) { - trace("[DEBUG] stageText focus OUT:", debugId); // Focus events are documented as bubbling. However, all events coming // from StageText are set to not bubble. So we need to create an // appropriate bubbling event here. @@ -1951,7 +1938,6 @@ public class ScrollableStageText extends UIComponent implements IStyleableEdita { if ( startTextEdit()) { - trace("[DEBUG] stageText SK ACTIVATE:", debugId); dispatchEvent(new SoftKeyboardEvent(event.type, true, event.cancelable, this, event.triggerType)); } @@ -1960,7 +1946,6 @@ public class ScrollableStageText extends UIComponent implements IStyleableEdita private function stageText_softKeyboardDeactivateHandler(event:SoftKeyboardEvent):void { if (endTextEdit()) { - trace("[DEBUG] stageText SK DE activate:", debugId); dispatchEvent(new SoftKeyboardEvent(event.type, true, event.cancelable, this, event.triggerType)); }
