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

Unified Diff: chrome/browser/resources/chromeos/login/oobe.js

Issue 9864056: chromeos: Send callback also on keyup and click when selecting language/network in OOBE (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: _ Created 8 years, 9 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/login/oobe.js
diff --git a/chrome/browser/resources/chromeos/login/oobe.js b/chrome/browser/resources/chromeos/login/oobe.js
index f1e65b92fba98d4d50f8a70448eba3d4cb1cc953..8c0ca09bbc4cc7b62addd39f6571302b3d865603 100644
--- a/chrome/browser/resources/chromeos/login/oobe.js
+++ b/chrome/browser/resources/chromeos/login/oobe.js
@@ -43,8 +43,19 @@ cr.define('cr.ui', function() {
select.appendChild(option);
}
if (callback) {
- select.addEventListener('blur', function(event) {
+ var send_callback = function() {
chrome.send(callback, [select.options[select.selectedIndex].value]);
+ };
+ select.addEventListener('blur', function(event) { send_callback(); });
+ select.addEventListener('click', function(event) { send_callback(); });
+ select.addEventListener('keyup', function(event) {
+ var keycode_interested = [
+ 9, // Tab
+ 13, // Enter
+ 27, // Escape
+ ];
+ if (keycode_interested.indexOf(event.keyCode) >= 0)
+ send_callback();
});
}
}
« 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