Index: third_party/google_input_tools/src/chrome/os/inputview/handler/pointerhandler.js |
diff --git a/third_party/google_input_tools/src/chrome/os/inputview/handler/pointerhandler.js b/third_party/google_input_tools/src/chrome/os/inputview/handler/pointerhandler.js |
index 3e7be7132d0f099562139448882e6cd17d80632b..9894de88c51f95be82452b16d333411b75eda5d7 100644 |
--- a/third_party/google_input_tools/src/chrome/os/inputview/handler/pointerhandler.js |
+++ b/third_party/google_input_tools/src/chrome/os/inputview/handler/pointerhandler.js |
@@ -89,6 +89,16 @@ PointerHandler.prototype.previousPointerActionBundle_ = null; |
/** |
+ * Pointer action bundle for mouse down. |
+ * This is used in mouse up handler because mouse up event may have different |
+ * target than the mouse down event. |
+ * |
+ * @private {i18n.input.chrome.inputview.handler.PointerActionBundle} |
+ */ |
+PointerHandler.prototype.pointerActionBundleForMouseDown_ = null; |
+ |
+ |
+/** |
* Creates a new pointer handler. |
* |
* @param {!Node} target . |
@@ -122,6 +132,7 @@ PointerHandler.prototype.onPointerDown_ = function(e) { |
pointerActionBundle.handlePointerDown(e); |
if (e.type == goog.events.EventType.MOUSEDOWN) { |
this.mouseDownTick_ = new Date(); |
+ this.pointerActionBundleForMouseDown_ = pointerActionBundle; |
} |
}; |
@@ -141,6 +152,11 @@ PointerHandler.prototype.onPointerUp_ = function(e) { |
goog.Timer.callOnce(this.onPointerUp_.bind(this, e), 50); |
return; |
} |
+ if (this.pointerActionBundleForMouseDown_) { |
+ this.pointerActionBundleForMouseDown_.handlePointerUp(e); |
+ this.pointerActionBundleForMouseDown_ = null; |
+ return; |
+ } |
} |
var uid = goog.getUid(e.target); |
var pointerActionBundle = this.pointerActionBundles_[uid]; |