| 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 fc13095d5eec9c815c1c54e713b4f6206a0a0f11..3f906ef06ed653a3d999a1a4c1b7f477677667f8 100644
|
| --- a/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js
|
| +++ b/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js
|
| @@ -15,12 +15,23 @@ Polymer({
|
| is: 'cr-dialog',
|
| extends: 'dialog',
|
|
|
| + properties: {
|
| + /**
|
| + * True if the dialog should remain open on 'popstate' events. This is used
|
| + * for navigable dialogs that have their separate navigation handling code.
|
| + */
|
| + ignorePopstate: {
|
| + type: Boolean,
|
| + value: false,
|
| + },
|
| + },
|
| +
|
| /** @override */
|
| - created: function() {
|
| + ready: function() {
|
| // If the active history entry changes (i.e. user clicks back button),
|
| // all open dialogs should be cancelled.
|
| window.addEventListener('popstate', function() {
|
| - if (this.open)
|
| + if (!this.ignorePopstate && this.open)
|
| this.cancel();
|
| }.bind(this));
|
| },
|
|
|