| Index: ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js
|
| diff --git a/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js b/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js
|
| index d15ed9b8173a769d12afe886806d1509a99cfffc..7660cf5e30f558c485ad9ece70385b4c088a4ee8 100644
|
| --- a/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js
|
| +++ b/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js
|
| @@ -43,7 +43,7 @@ Polymer({
|
|
|
| cancel: function() {
|
| this.fire('cancel');
|
| - HTMLDialogElement.prototype.close.call(this, '');
|
| + this.close('');
|
| },
|
|
|
| /**
|
| @@ -51,7 +51,11 @@ Polymer({
|
| * @override
|
| */
|
| close: function(opt_returnValue) {
|
| - HTMLDialogElement.prototype.close.call(this, 'success');
|
| + var returnValue = opt_returnValue == '' ? opt_returnValue : 'success';
|
| + // Moving the focus to a child of |this| that resides outside the
|
| + // |this.shadowRoot| seems to cause the focus to not be lost.
|
| + this.querySelector('paper-button').focus();
|
| + HTMLDialogElement.prototype.close.call(this, returnValue);
|
| },
|
|
|
| /** @return {!PaperIconButtonElement} */
|
|
|