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

Unified Diff: chrome/browser/resources/md_downloads/crisper.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/md_downloads/crisper.js
diff --git a/chrome/browser/resources/md_downloads/crisper.js b/chrome/browser/resources/md_downloads/crisper.js
index 55db37276f878b9e72f751573f00b9f95113255b..78bc7981867f3ae6634b4ae33ecaf0d73c46f22a 100644
--- a/chrome/browser/resources/md_downloads/crisper.js
+++ b/chrome/browser/resources/md_downloads/crisper.js
@@ -648,6 +648,8 @@ function queryRequiredElement(selectors, opt_context) {
[ 'click', 'auxclick' ].forEach(function(eventName) {
document.addEventListener(eventName, function(e) {
+ if (e.button !== 0 && e.button !== 1)
+ return; // Ignore buttons other than left and middle.
Dan Beam 2016/09/12 19:18:59 this is a generated file you need to update ui/we
Navid Zolghadr 2016/09/12 19:50:09 Umm. That is weird. Because I changed this file in
Dan Beam 2016/09/12 21:25:32 you changed both util.js and crisper.js in similar
if (e.defaultPrevented) return;
var eventPath = e.path;
var anchor = null;
@@ -6963,4 +6965,4 @@ cr.define('downloads', function() {
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-window.addEventListener('load', downloads.Manager.onLoad);
+window.addEventListener('load', downloads.Manager.onLoad);

Powered by Google App Engine
This is Rietveld 408576698