flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosrov...@apache.org
Subject [1/2] git commit: [flex-asjs] [refs/heads/develop] - TextInput remove inputhandler goog reference
Date Thu, 06 Mar 2014 15:31:42 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 47a43defa -> 496c0e62b


TextInput remove inputhandler goog reference


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

Branch: refs/heads/develop
Commit: 85b615044185007944823c6498e87deca857a5d5
Parents: 47a43de
Author: Carlos Rovira <carlosrovira@apache.org>
Authored: Thu Mar 6 15:07:20 2014 +0100
Committer: Carlos Rovira <carlosrovira@apache.org>
Committed: Thu Mar 6 16:31:25 2014 +0100

----------------------------------------------------------------------
 .../flex/html/staticControls/TextInput.js       | 31 ++++++++++++--------
 1 file changed, 18 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/85b61504/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextInput.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextInput.js b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextInput.js
index a71acfb..48cccab 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextInput.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextInput.js
@@ -14,7 +14,6 @@
 
 goog.provide('org.apache.flex.html.staticControls.TextInput');
 
-goog.require('goog.events.InputHandler');
 goog.require('org.apache.flex.core.UIBase');
 
 
@@ -43,14 +42,13 @@ org.apache.flex.html.staticControls.TextInput.prototype.FLEXJS_CLASS_INFO
=
 /**
  * @override
  */
-org.apache.flex.html.staticControls.TextInput.prototype.createElement =
-    function() {
+org.apache.flex.html.staticControls.TextInput.prototype.createElement = function() {
   this.element = document.createElement('input');
   this.element.setAttribute('type', 'input');
 
   //attach input handler to dispatch flexjs change event when user write in textinput
-  var ih = new goog.events.InputHandler(this.element);
-  goog.events.listen(ih, goog.events.InputHandler.EventType.INPUT, goog.bind(this.inputChangeHandler_,
this));
+  //goog.events.listen(this.element, 'change', goog.bind(this.killChangeHandler, this));
+  goog.events.listen(this.element, 'input', goog.bind(this.inputChangeHandler_, this));
 
   this.positioner = this.element;
   this.element.flexjs_wrapper = this;
@@ -72,19 +70,26 @@ org.apache.flex.html.staticControls.TextInput.prototype.get_text = function()
{
  * @expose
  * @param {string} value The text setter.
  */
-org.apache.flex.html.staticControls.TextInput.prototype.set_text =
-    function(value) {
+org.apache.flex.html.staticControls.TextInput.prototype.set_text = function(value) {
   this.element.value = value;
 };
 
 
 /**
+ * @expose
+ * @param {Object} event The event.
+ */
+/*org.apache.flex.html.staticControls.TextInput.prototype.killChangeHandler = function(event)
{
+    //event.preventDefault();
+};*/
+
+
+/**
  * @private
  * @param {Object} event The event.
  */
-org.apache.flex.html.staticControls.TextInput.prototype.inputChangeHandler_ =
-    function(event) {
-        event.stopPropagation();
-        
-        this.dispatchEvent(new org.apache.flex.events.Event(org.apache.flex.events.Event.EventType.CHANGE));
-      };
+org.apache.flex.html.staticControls.TextInput.prototype.inputChangeHandler_ = function(event)
{
+  event.stopPropagation();
+
+  this.dispatchEvent(new org.apache.flex.events.Event(org.apache.flex.events.Event.EventType.CHANGE));
+};


Mime
View raw message