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

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/tutorial.js

Issue 2480303003: Fix links in tutorial (Closed)
Patch Set: Piggybacking node.url check for images. Created 4 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
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.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/chromeos/chromevox/cvox2/background/tutorial.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/tutorial.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/tutorial.js
index 582574b19831a2cbdb37aeed62cf9d45b2d88c40..4b42c9f49807d56a542a3b6bcbdaa70a39bbd3f8 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/tutorial.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/tutorial.js
@@ -178,7 +178,10 @@ Tutorial.prototype = {
element = document.createElement('li');
} else if (pageElement.link) {
element = document.createElement('a');
- element.href = pageElement.link;
dmazzoni 2016/11/07 23:55:35 I think you should add href='#' or role="link" and
David Tseng 2016/11/08 02:47:24 Strange it worked for me as I definitely moved to
+ element.onclick = function() {
dmazzoni 2016/11/07 23:55:35 return false, or stopPropagation/preventDefault?
David Tseng 2016/11/08 02:47:24 Ok, explicitly returning false
+ Panel.closeMenusAndRestoreFocus();
+ chrome.windows.create({url: pageElement.link});
+ };
element.target = '_blank';
} else {
element = document.createElement('p');
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698