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

Unified Diff: chrome/browser/resources/inspect/inspect.js

Issue 2059913002: Remove keyIdentifier usage in chrome/browser/resources/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chromeos build Created 4 years, 6 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/inspect/inspect.js
diff --git a/chrome/browser/resources/inspect/inspect.js b/chrome/browser/resources/inspect/inspect.js
index b8747ff040a0fa65800c10dcdb79ca26e91eea92..e9b2661637f43bf538cc2cbf80d6f27859714c81 100644
--- a/chrome/browser/resources/inspect/inspect.js
+++ b/chrome/browser/resources/inspect/inspect.js
@@ -314,7 +314,7 @@ function populateRemoteTargets(devices) {
input.value = '';
}.bind(null, browser.source, browser.id, newPageUrl);
newPageUrl.addEventListener('keyup', function(handler, event) {
- if (event.keyIdentifier == 'Enter' && event.target.value)
+ if (event.key == 'Enter' && event.target.value)
handler();
}.bind(null, openHandler), true);
@@ -590,7 +590,7 @@ function addActionLink(row, text, handler, opt_disabled) {
link.textContent = text;
link.addEventListener('click', handler, true);
function handleKey(e) {
- if (e.keyIdentifier == 'Enter' || e.keyIdentifier == 'U+0020') {
+ if (e.key == 'Enter' || e.key == ' ') {
e.preventDefault();
handler();
}
@@ -732,7 +732,7 @@ function createConfigLine(port, location) {
location, 'location', 'IP address and port', validateLocation);
line.appendChild(locationInput);
locationInput.addEventListener('keydown', function(e) {
- if (e.keyIdentifier == 'U+0009' && // Tab
+ if (e.key == 'Tab' &&
!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey &&
line.classList.contains('fresh') &&
!line.classList.contains('empty')) {
« no previous file with comments | « chrome/browser/resources/hotword_audio_verification/main.js ('k') | chrome/browser/resources/md_downloads/crisper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698