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

Side by Side Diff: chrome/browser/resources/options/language_dictionary_overlay.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 /** @const */ var DictionaryWordsList = 6 /** @const */ var DictionaryWordsList =
7 options.dictionary_words.DictionaryWordsList; 7 options.dictionary_words.DictionaryWordsList;
8 /** @const */ var Page = cr.ui.pageManager.Page; 8 /** @const */ var Page = cr.ui.pageManager.Page;
9 /** @const */ var PageManager = cr.ui.pageManager.PageManager; 9 /** @const */ var PageManager = cr.ui.pageManager.PageManager;
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 this.onWordListChanged_(); 56 this.onWordListChanged_();
57 }.bind(this); 57 }.bind(this);
58 58
59 this.searchField_ = $('language-dictionary-overlay-search-field'); 59 this.searchField_ = $('language-dictionary-overlay-search-field');
60 this.searchField_.onsearch = function(e) { 60 this.searchField_.onsearch = function(e) {
61 this.wordList_.search(e.currentTarget.value); 61 this.wordList_.search(e.currentTarget.value);
62 }.bind(this); 62 }.bind(this);
63 this.searchField_.onkeydown = function(e) { 63 this.searchField_.onkeydown = function(e) {
64 // Don't propagate enter key events. Otherwise the default button will 64 // Don't propagate enter key events. Otherwise the default button will
65 // activate. 65 // activate.
66 if (e.keyIdentifier == 'Enter') 66 if (e.key == 'Enter')
67 e.stopPropagation(); 67 e.stopPropagation();
68 }; 68 };
69 69
70 this.noMatchesLabel_ = getRequiredElement( 70 this.noMatchesLabel_ = getRequiredElement(
71 'language-dictionary-overlay-no-matches'); 71 'language-dictionary-overlay-no-matches');
72 72
73 $('language-dictionary-overlay-done-button').onclick = function(e) { 73 $('language-dictionary-overlay-done-button').onclick = function(e) {
74 PageManager.closeOverlay(); 74 PageManager.closeOverlay();
75 }; 75 };
76 }, 76 },
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 }; 108 };
109 109
110 EditDictionaryOverlay.getWordListForTesting = function() { 110 EditDictionaryOverlay.getWordListForTesting = function() {
111 return EditDictionaryOverlay.getInstance().wordList_; 111 return EditDictionaryOverlay.getInstance().wordList_;
112 }; 112 };
113 113
114 return { 114 return {
115 EditDictionaryOverlay: EditDictionaryOverlay 115 EditDictionaryOverlay: EditDictionaryOverlay
116 }; 116 };
117 }); 117 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/inline_editable_list.js ('k') | chrome/browser/resources/options/language_options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698