File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
app/code/Magento/Checkout/view/frontend/web/js Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ define([
2626 initialize : function ( ) {
2727 this . _super ( ) ;
2828 $ ( window ) . hashchange ( _ . bind ( stepNavigator . handleHash , stepNavigator ) ) ;
29+
30+ if ( ! window . location . hash ) {
31+ stepNavigator . setHash ( stepNavigator . steps ( ) . sort ( stepNavigator . sortItems ) [ 0 ] . code ) ;
32+ }
33+
2934 stepNavigator . handleHash ( ) ;
3035 } ,
3136
You can’t perform that action at this time.
0 commit comments