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

Unified Diff: chrome/browser/resources/chromeos/keyboard_overlay.js

Issue 2242183002: [Merge to M53] Fix a regression in the keyboard overlay go back/forward shortcuts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/keyboard_overlay.js
diff --git a/chrome/browser/resources/chromeos/keyboard_overlay.js b/chrome/browser/resources/chromeos/keyboard_overlay.js
index 1d4c9b9ab426f8d892470a28c13d971c2ddfaf56..dc6e05ad97e0f5886ae7afe3b33d2058ce670797 100644
--- a/chrome/browser/resources/chromeos/keyboard_overlay.js
+++ b/chrome/browser/resources/chromeos/keyboard_overlay.js
@@ -212,6 +212,14 @@ function getShortcutData() {
delete shortcutDataCache['0<>CTRL<>SHIFT'];
}
+ if (!loadTimeData.getBoolean('backspaceGoesBackFeatureEnabled')) {
+ // If the "backspace key goes back" experiment is not enabled, then we
+ // clear the shortcuts for Backspace and Shift+Backspace to go back or
+ // forward respectively.
+ delete shortcutDataCache['backspace'];
+ delete shortcutDataCache['backspace<>SHIFT'];
+ }
+
return shortcutDataCache;
}
@@ -555,15 +563,6 @@ function update(modifiers, normModifiers) {
classes.push('keyboard-overlay-key-background');
- if ((shortcutId == 'keyboardOverlayGoBack' ||
- shortcutId == 'keyboardOverlayGoForward') &&
- !loadTimeData.getBoolean('backspaceGoesBackFeatureEnabled')) {
- // If the "backspace key goes back" experiment is not enabled, then we
- // clear the shortcuts for Backspace and Shift+Backspace to go back or
- // forward respectively.
- shortcutId = null;
- }
-
if (shortcutId) {
classes.push('is-shortcut');
classes.push('keyboard-overlay-shortcut-key-background');
« 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