| Index: chrome/browser/resources/md_history/app.crisper.js
|
| diff --git a/chrome/browser/resources/md_history/app.crisper.js b/chrome/browser/resources/md_history/app.crisper.js
|
| index 3e75862e14094e32974a703a7d4959977c019372..13564d27c06fb4aac553262553bc4e13af51e2f7 100644
|
| --- a/chrome/browser/resources/md_history/app.crisper.js
|
| +++ b/chrome/browser/resources/md_history/app.crisper.js
|
| @@ -7745,6 +7745,16 @@ Polymer({
|
| is: 'cr-dialog',
|
| extends: 'dialog',
|
|
|
| + /** @override */
|
| + created: 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)
|
| + this.cancel();
|
| + }.bind(this));
|
| + },
|
| +
|
| cancel: function() {
|
| this.fire('cancel');
|
| HTMLDialogElement.prototype.close.call(this, '');
|
| @@ -14434,7 +14444,9 @@ Polymer({
|
| },
|
|
|
| unselectAllItems: function(count) {
|
| - this.getSelectedList_().unselectAllItems(count);
|
| + var selectedList = this.getSelectedList_();
|
| + if (selectedList)
|
| + selectedList.unselectAllItems(count);
|
| },
|
|
|
| /**
|
|
|