Skip to content

Commit 71bfdc6

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-64173' into 2.3-develop-pr21
2 parents 745d99d + f8355ae commit 71bfdc6

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,15 @@ define([
182182
});
183183
},
184184

185+
/**
186+
* Sets window location hash.
187+
*
188+
* @param {String} hash
189+
*/
190+
setHash: function (hash) {
191+
window.location.hash = hash;
192+
},
193+
185194
/**
186195
* Next step.
187196
*/
@@ -199,7 +208,7 @@ define([
199208
if (steps().length > activeIndex + 1) {
200209
code = steps()[activeIndex + 1].code;
201210
steps()[activeIndex + 1].isVisible(true);
202-
window.location = window.checkoutConfig.checkoutUrl + '#' + code;
211+
this.setHash(code);
203212
document.body.scrollTop = document.documentElement.scrollTop = 0;
204213
}
205214
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ define([
2525
initialize: function () {
2626
this._super();
2727
window.addEventListener('hashchange', _.bind(stepNavigator.handleHash, stepNavigator));
28+
29+
if (!window.location.hash) {
30+
stepNavigator.setHash(stepNavigator.steps().sort(stepNavigator.sortItems)[0].code);
31+
}
32+
2833
stepNavigator.handleHash();
2934
},
3035

0 commit comments

Comments
 (0)