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

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

Issue 2556893002: Fix broken panel menus (Closed)
Patch Set: Created 4 years 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 | 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/panel_menu.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu.js
index d278914e685d0060d098ca11a107aff582f2b9e1..a5890f601475ae819fadb750534f1a3a4a6c803d 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu.js
@@ -310,10 +310,14 @@ PanelNodeMenu.prototype = {
var range = cursors.Range.fromNode(node);
output.withSpeech(range, range, Output.EventType.NAVIGATE);
var label = output.toString();
- this.addMenuItem(label, '', '', function() {
- chrome.extension.getBackgroundPage().ChromeVoxState
- .instance['navigateToRange'](cursors.Range.fromNode(node));
- });
+ this.addMenuItem(label, '', '', (function() {
+ var savedNode = node;
+ return function() {
+ chrome.extension.getBackgroundPage().ChromeVoxState
+ .instance['navigateToRange'](cursors.Range.fromNode(savedNode));
+ };
+ }()));
+
if (this.selectNext_) {
this.activateItem(this.items_.length - 1);
this.selectNext_ = false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698