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

Unified Diff: chrome/browser/resources/ntp4/new_tab.js

Issue 2337513002: Only handle click actions for left & middle buttons (Closed)
Patch Set: Created 4 years, 3 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
Index: chrome/browser/resources/ntp4/new_tab.js
diff --git a/chrome/browser/resources/ntp4/new_tab.js b/chrome/browser/resources/ntp4/new_tab.js
index 821ab156cd779d54f7466c95de0226069addbf21..1ed17a4f68406d1d0083375cca1744ad397b0ddd 100644
--- a/chrome/browser/resources/ntp4/new_tab.js
+++ b/chrome/browser/resources/ntp4/new_tab.js
@@ -160,6 +160,8 @@ cr.define('ntp', function() {
* @param {Event} e The click/auxclick event.
*/
function onChromeWebStoreButtonClick(e) {
+ if (e.button !== 0 && e.button !== 1)
+ return; // Ignore buttons other than left and middle.
chrome.send('recordAppLaunchByURL',
[encodeURIComponent(this.href),
ntp.APP_LAUNCH.NTP_WEBSTORE_FOOTER]);

Powered by Google App Engine
This is Rietveld 408576698