diff --git a/CHANGELOG.md b/CHANGELOG.md index 43c681c66..fc9e9396b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ This file includes only changes we consider noteworthy for users, admins and plu - Support X-Forwarded-Host/X-Forwarded-Port in self URLs generation (#9952) - Support $HasAttachment/$HasNoAttachment keywords for "With attachment" search filter (#10053) - Password: Extend Dovecot passwdfile driver with dynamic file path support (#10036) +- Fix a UI issue on using browser Back button after allowing remote resources (#10062) ## 1.7-rc2 diff --git a/program/js/app.js b/program/js/app.js index cc6a3547b..fcd9c7058 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -2766,11 +2766,7 @@ function rcube_webmail() { } else { // "Allow remote resources" reloads the page, we remove this request from the history, // so Back button works as expected, i.e. ignores the reload request (#6620) - if (safe && document.referrer && window.history.replaceState) { - window.history.replaceState({}, '', document.referrer); - } - - this.location_href(url, target, true); + this.location_href(url, target, true, safe && document.referrer); } } }; @@ -9548,7 +9544,7 @@ function rcube_webmail() { this.redirect(url, lock); }; - this.location_href = function (url, target, frame) { + this.location_href = function (url, target, frame, replace) { if (frame) { this.lock_frame(target); } @@ -9557,9 +9553,8 @@ function rcube_webmail() { url = this.env.comm_path + '&' + $.param(url); } - // simulate real link click to force IE to send referer header - if (bw.ie && target == window) { - $('').attr('href', url).appendTo(document.body).get(0).click(); + if (replace) { + target.location.replace(url); } else { target.location.href = url; }