Commit 3bc737b1 authored by Henning Leutz's avatar Henning Leutz 🥋
parent ea7c49c6
......@@ -27,6 +27,7 @@ define('package/quiqqer/gallery/bin/controls/Popup', [
'$onOpen',
'$onClose',
'$keyup',
'$onPopState',
'showNextImage',
'showPrevImage',
......@@ -264,6 +265,7 @@ define('package/quiqqer/gallery/bin/controls/Popup', [
// bind keys
window.addEvent('keyup', this.$keyup);
window.addEvent('popstate', this.$onPopState);
if (!this.__$current) {
this.showFirstImage();
......@@ -320,6 +322,7 @@ define('package/quiqqer/gallery/bin/controls/Popup', [
}
window.removeEvent('keyup', this.$keyup);
window.removeEvent('popstate', this.$onPopState);
},
/**
......@@ -624,6 +627,13 @@ define('package/quiqqer/gallery/bin/controls/Popup', [
if (event.key === 'esc') {
this.close();
}
},
/**
* on popup state
*/
$onPopState: function () {
this.close();
}
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment