flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [13/16] git commit: [flex-asjs] [refs/heads/develop] - when dispatching some events, target doesn't get set so fallback to using currentTarget which seems to work for now
Date Mon, 05 Jan 2015 23:21:32 GMT
when dispatching some events, target doesn't get set so fallback to using currentTarget which
seems to work for now


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/98487bfc
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/98487bfc
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/98487bfc

Branch: refs/heads/develop
Commit: 98487bfc74e24ca43957c363c9fa27190d66bd7e
Parents: 7487a05
Author: Alex Harui <aharui@apache.org>
Authored: Mon Jan 5 14:28:32 2015 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Mon Jan 5 15:21:02 2015 -0800

----------------------------------------------------------------------
 .../js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/98487bfc/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js b/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
index 4eca663..be0426a 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
@@ -138,8 +138,10 @@ org.apache.flex.core.HTMLElementWrapper.prototype.removeBead = function(bead)
{
  * @return {Object} The wrapping object.
  */
 Event.prototype.get_target = function() {
-  var obj = this.target.flexjs_wrapper;
-  return obj;
+  var obj = this.target;
+  if (!obj)
+    return this.currentTarget;
+  return obj.flexjs_wrapper;
 };
 
 


Mime
View raw message