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

Unified Diff: chrome/browser/resources/md_downloads/crisper.js

Issue 1821023003: MD Downloads: fix double click bug (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | ui/webui/resources/js/action_link.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4c03152402268766a3358ea7da910c3ff36dd979..9ff07deae87c16151f4ad3c13d97404a42d4fa20 100644
--- a/chrome/browser/resources/md_downloads/crisper.js
+++ b/chrome/browser/resources/md_downloads/crisper.js
@@ -1760,7 +1760,7 @@ var ActionLink = document.registerElement('action-link', {
this.setAttribute('role', 'link');
this.addEventListener('keydown', function(e) {
- if (!this.disabled && e.keyIdentifier == 'Enter') {
+ if (!this.disabled && e.keyIdentifier == 'Enter' && !this.href) {
// Schedule a click asynchronously because other 'keydown' handlers
// may still run later (e.g. document.addEventListener('keydown')).
// Specifically options dialogs break when this timeout isn't here.
« no previous file with comments | « no previous file | ui/webui/resources/js/action_link.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698