Fixed accidental back() requests when closing detail dialogs

This commit is contained in:
Stefan Zermatten
2015-07-29 09:54:18 +02:00
parent 4b984d4fac
commit 4d3fc3bb09

View File

@@ -77,10 +77,10 @@ this.GlobalUI = (function() {
var throttleBack = _.throttle(function() {
history.back();
}, 800, {trailing: false});
}, 100, {trailing: false});
GlobalUI.closeDetail = function() {
if (!!(window.history && window.history.pushState)) {
if (window.history && history.pushState && history.state.detail === "opened") {
throttleBack();
} else {
Session.set("global.ui.detailShow", false);