diff --git a/js/slideshowcontrols.js b/js/slideshowcontrols.js index 3dead6e2e9..b0553d3b0b 100644 --- a/js/slideshowcontrols.js +++ b/js/slideshowcontrols.js @@ -347,11 +347,11 @@ _exit: function () { // Only modern browsers can manipulate history - if (history && history.replaceState) { + if (history && history.replaceState && window.history.length > 1) { // We simulate a click on the back button in order to be consistent window.history.back(); } else { - // For ancient browsers supported in core + // There is no history to go back to. this.stop(); } },