Index: chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js |
diff --git a/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js |
index 1ad09823a8fd1dccfaec8d7d3fa7e1c96b54d9c8..dffdb904df526860b8a4ebe585ce8d742df7ef66 100644 |
--- a/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js |
+++ b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js |
@@ -337,6 +337,10 @@ Polymer({ |
dialogId: String, |
}, |
+ observers: [ |
+ 'dialogUpdated_(dialogId, pairingEvent)', |
+ ], |
+ |
open: function() { |
this.pinOrPass = ''; |
this.getDialog_().showModal(); |
@@ -348,6 +352,14 @@ Polymer({ |
dialog.close(); |
}, |
+ /** @private */ |
+ dialogUpdated_: function() { |
+ if (this.showEnterPincode_(this.pairingEvent)) |
+ this.$$('#pincode').focus(); |
+ else if (this.showEnterPasskey_(this.pairingEvent)) |
+ this.$$('#passkey').focus(); |
+ }, |
+ |
/** |
* @return {!CrDialogElement} |
* @private |