Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2191)

Unified Diff: third_party/google_input_tools/src/chrome/os/inputview/handler/pointerhandler.js

Issue 701603002: Update to google-input-tools version 1.0.5.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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];

Powered by Google App Engine
This is Rietveld 408576698