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

Unified Diff: chrome/browser/resources/synthetic_middleclick.js

Issue 2018943003: Fix history page middle click action (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing the comment Created 4 years, 7 months 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
« no previous file with comments | « chrome/browser/resources/ntp4/synthetic_middleclick.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/synthetic_middleclick.js
diff --git a/chrome/browser/resources/ntp4/synthetic_middleclick.js b/chrome/browser/resources/synthetic_middleclick.js
similarity index 84%
rename from chrome/browser/resources/ntp4/synthetic_middleclick.js
rename to chrome/browser/resources/synthetic_middleclick.js
index 8c90c98a7f5abab97c059ede25c5e2a1345170b4..03b982e47a6bba36a526b67badbb6db7b0f5b5c2 100644
--- a/chrome/browser/resources/ntp4/synthetic_middleclick.js
+++ b/chrome/browser/resources/synthetic_middleclick.js
@@ -21,4 +21,9 @@ document.addEventListener('mouseup', function(e) {
middleButtonMouseDownTarget = null;
}, true);
+window.addEventListener('click', function(e) {
+ if (e.button == 1 && !e.isTrusted)
+ e.preventDefault();
+});
+
})();
« no previous file with comments | « chrome/browser/resources/ntp4/synthetic_middleclick.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698