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

Side by Side Diff: chrome/browser/resources/chromeos/login/oobe.js

Issue 11421111: Fixed button focusing in OOBE screens. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed old code. Created 8 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 unified diff | Download patch | Annotate | Revision Log
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 /** 5 /**
6 * @fileoverview Out of the box experience flow (OOBE). 6 * @fileoverview Out of the box experience flow (OOBE).
7 * This is the main code for the OOBE WebUI implementation. 7 * This is the main code for the OOBE WebUI implementation.
8 */ 8 */
9 9
10 var localStrings = new LocalStrings(); 10 var localStrings = new LocalStrings();
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 chrome.send('eulaOnTpmPopupOpened'); 89 chrome.send('eulaOnTpmPopupOpened');
90 $('popup-overlay').hidden = false; 90 $('popup-overlay').hidden = false;
91 $('security-ok-button').focus(); 91 $('security-ok-button').focus();
92 }); 92 });
93 93
94 Oobe.initializeA11yMenu(); 94 Oobe.initializeA11yMenu();
95 95
96 $('security-ok-button').addEventListener('click', function(event) { 96 $('security-ok-button').addEventListener('click', function(event) {
97 $('popup-overlay').hidden = true; 97 $('popup-overlay').hidden = true;
98 }); 98 });
99
99 // Do not allow focus leaving the overlay. 100 // Do not allow focus leaving the overlay.
100 $('popup-overlay').addEventListener('focusout', function(event) { 101 $('popup-overlay').addEventListener('focusout', function(event) {
101 // WebKit does not allow immediate focus return. 102 // WebKit does not allow immediate focus return.
102 setTimeout(function() { $('security-ok-button').focus(); }, 0); 103 setTimeout(function() { $('security-ok-button').focus(); }, 0);
103 event.preventDefault(); 104 event.preventDefault();
104 }); 105 });
105 106
106 chrome.send('screenStateInitialize'); 107 chrome.send('screenStateInitialize');
107 }; 108 };
108 109
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 // Allow selection events on components with editable text (password field) 454 // Allow selection events on components with editable text (password field)
454 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) 455 // bug (http://code.google.com/p/chromium/issues/detail?id=125863)
455 disableTextSelectAndDrag(function(e) { 456 disableTextSelectAndDrag(function(e) {
456 var src = e.target; 457 var src = e.target;
457 return src instanceof HTMLTextAreaElement || 458 return src instanceof HTMLTextAreaElement ||
458 src instanceof HTMLInputElement && 459 src instanceof HTMLInputElement &&
459 /text|password|search/.test(src.type); 460 /text|password|search/.test(src.type);
460 }); 461 });
461 462
462 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize); 463 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698