diff --git a/js/slideshowcontrols.js b/js/slideshowcontrols.js index 530b2b2a9c..4f8a4e0d93 100644 --- a/js/slideshowcontrols.js +++ b/js/slideshowcontrols.js @@ -350,11 +350,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(); } },