Skip to content

Commit db2efcb

Browse files
committed
MAGETWO-73537: Browser back button issue (Checkout pages)
1 parent 8f93123 commit db2efcb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

app/code/Magento/Checkout/view/frontend/web/js/model/step-navigator.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,12 @@ define([
183183
},
184184

185185
/**
186-
* Sets window location.
186+
* Sets window location hash.
187187
*
188-
* @param {String} code
188+
* @param {String} hash
189189
*/
190-
setLocation: function (code) {
191-
window.location = window.checkoutConfig.checkoutUrl + '#' + code;
190+
setHash: function (hash) {
191+
window.location.hash = hash;
192192
},
193193

194194
/**
@@ -208,7 +208,7 @@ define([
208208
if (steps().length > activeIndex + 1) {
209209
code = steps()[activeIndex + 1].code;
210210
steps()[activeIndex + 1].isVisible(true);
211-
this.setLocation(code);
211+
this.setHash(code);
212212
document.body.scrollTop = document.documentElement.scrollTop = 0;
213213
}
214214
}

app/code/Magento/Checkout/view/frontend/web/js/view/progress-bar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ define([
2828
$(window).hashchange(_.bind(stepNavigator.handleHash, stepNavigator));
2929

3030
if (!window.location.hash) {
31-
stepNavigator.setLocation(stepNavigator.steps().sort(stepNavigator.sortItems)[0].code);
31+
stepNavigator.setHash(stepNavigator.steps().sort(stepNavigator.sortItems)[0].code);
3232
}
3333

3434
stepNavigator.handleHash();

0 commit comments

Comments
 (0)