Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 | 6 * @fileoverview |
| 7 * 'settings-ui' implements the UI for the Settings page. | 7 * 'settings-ui' implements the UI for the Settings page. |
| 8 * | 8 * |
| 9 * Example: | 9 * Example: |
| 10 * | 10 * |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 261 this.$.drawer.closeDrawer(); | 261 this.$.drawer.closeDrawer(); |
| 262 }, | 262 }, |
| 263 | 263 |
| 264 /** @private */ | 264 /** @private */ |
| 265 onMenuButtonTap_: function() { | 265 onMenuButtonTap_: function() { |
| 266 this.$.drawer.toggle(); | 266 this.$.drawer.toggle(); |
| 267 }, | 267 }, |
| 268 | 268 |
| 269 /** @private */ | 269 /** @private */ |
| 270 onMenuClosed_: function() { | 270 onMenuClosed_: function() { |
| 271 // Add tab index so that the container can be focused. | |
| 272 this.$.container.setAttribute('tabindex', '-1'); | |
| 271 this.$.container.focus(); | 273 this.$.container.focus(); |
| 274 | |
| 275 listenOnce(this.$.container, ['blur', 'pointerdown'], function(e) { | |
|
Dan Beam
2017/04/08 01:34:16
nit: don't need |e| any more
dpapad
2017/04/08 01:35:36
Done.
| |
| 276 this.$.container.removeAttribute('tabindex'); | |
| 277 }.bind(this)); | |
| 272 }, | 278 }, |
| 273 | 279 |
| 274 /** @private */ | 280 /** @private */ |
| 275 directionDelegateChanged_: function() { | 281 directionDelegateChanged_: function() { |
| 276 this.$.drawer.align = this.directionDelegate.isRtl() ? | 282 this.$.drawer.align = this.directionDelegate.isRtl() ? |
| 277 'right' : 'left'; | 283 'right' : 'left'; |
| 278 }, | 284 }, |
| 279 }); | 285 }); |
| OLD | NEW |