Index: chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js |
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js b/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js |
index eb78cece55a5ede3bef128bff1cbb229359bd24d..88b5cbf461ebe0124e1c18deb54dbc97eaca2a21 100644 |
--- a/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js |
+++ b/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js |
@@ -169,13 +169,18 @@ login.createScreen('HIDDetectionScreen', 'hid-detection', function() { |
if (state == 'update') |
return; |
var deviceBlock = $(blockId); |
- for (var stateCase in this.CONNECTION) |
+ for (var key in this.CONNECTION) { |
+ var stateCase = this.CONNECTION[key]; |
deviceBlock.classList.toggle(stateCase, stateCase == state); |
+ } |
// 'Continue' button available iff at least one device is connected, |
- if ((blockId in this.BLOCK) && |
- (state == this.CONNECTION.CONNECTED || |
- state == this.CONNECTION.PAIRED)) { |
+ var keyboardState = this.context.get(CONTEXT_KEY_KEYBOARD_STATE, ''); |
Nikita (slow)
2015/02/26 12:10:08
As discussed, please move this login to C++ side.
|
+ var mouseState = this.context.get(CONTEXT_KEY_MOUSE_STATE, ''); |
+ if (keyboardState == this.CONNECTION.CONNECTED || |
+ keyboardState == this.CONNECTION.PAIRED || |
+ mouseState == this.CONNECTION.CONNECTED || |
+ mouseState == this.CONNECTION.PAIRED) { |
$('hid-continue-button').disabled = false; |
} else { |
$('hid-continue-button').disabled = true; |