You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pi...@apache.org on 2017/08/13 22:04:30 UTC
[37/42] git commit: [flex-asjs] [refs/heads/feature/amf] - Fixed
event handling
Fixed event handling
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/dcd748c8
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/dcd748c8
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/dcd748c8
Branch: refs/heads/feature/amf
Commit: dcd748c8c2d3732891419599438cf13ecc6ce27b
Parents: e830366
Author: Harbs <ha...@in-tools.com>
Authored: Wed Aug 9 19:45:30 2017 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Wed Aug 9 19:45:30 2017 +0300
----------------------------------------------------------------------
.../org/apache/flex/html/beads/DispatchInputFinishedBead.as | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dcd748c8/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DispatchInputFinishedBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DispatchInputFinishedBead.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DispatchInputFinishedBead.as
index 40cc900..7b932e2 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DispatchInputFinishedBead.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DispatchInputFinishedBead.as
@@ -23,10 +23,12 @@ package org.apache.flex.html.beads
import org.apache.flex.core.IStrand;
import org.apache.flex.events.Event;
import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.events.utils.WhitespaceKeys;
COMPILE::JS
{
import org.apache.flex.core.IRenderedObject;
+ import org.org.apache.flex.events.KeyboardEvent;
import goog.events;
}
@@ -35,6 +37,7 @@ package org.apache.flex.html.beads
import flash.events.FocusEvent;
import flash.events.KeyboardEvent;
import org.apache.flex.html.beads.ITextFieldView;
+ import org.apache.flex.events.utils.WhitespaceKeys;
}
/**
@@ -118,9 +121,9 @@ package org.apache.flex.html.beads
* @private
*/
COMPILE::JS
- private function keydownHandler( event:Object ) : void
+ private function keydownHandler( event:KeyboardEvent ) : void
{
- if (event.keyCode == 13) //enter
+ if (event.key == WhitespaceKeys.ENTER) //enter
{
(_strand as IEventDispatcher).dispatchEvent(new Event(INPUT_FINISHED));
}