Skip to content

Commit fc4a5c3

Browse files
author
Alex Akimov
committed
MAGETWO-43469: Scroll Page to Top when Next Button is Clicked to Trigger Transition between Checkout Steps
1 parent 9fc9c24 commit fc4a5c3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,9 @@ define(
134134
});
135135
if (steps().length > activeIndex + 1) {
136136
var code = steps()[activeIndex + 1].code;
137-
var bodyElem = $.browser.safari || $.browser.chrome ? $("body") : $("html");
138137
steps()[activeIndex + 1].isVisible(true);
139-
bodyElem.animate({scrollTop: $('#' + code).offset().top}, 0, function () {
140-
window.location = window.checkoutConfig.checkoutUrl + "#" + code;
141-
});
138+
window.location = window.checkoutConfig.checkoutUrl + "#" + code;
139+
document.body.scrollTop = document.documentElement.scrollTop = 0;
142140
}
143141
}
144142
};

0 commit comments

Comments
 (0)