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

Unified Diff: chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js

Issue 2218713002: MD Settings: Bluetooth polish (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
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

Powered by Google App Engine
This is Rietveld 408576698