-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: CheckoutIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report

Description
Steps to reproduce
- Add a product to the cart
- Make sure you have at least one Shipping Method active (e.g. Flat Rate)
- Navigate to Shopping Cart page
- Observe the result
Expected result
- Shipping should be estimated without errors
Actual result
- Loading indicator keeps spinning
- There is an exception thrown in IE console "Object doesn't support this action"
Observations
Reproduceable when using Internet Explorer 9+ browser.
It happens because in the file "magento/module-checkout/view/frontend/web/js/view/cart/totals.js" there are two calls to instantiate event by using new Event('resize')
which is not supported by Internet Explorer.
One possible fix would be to refactor the event dispatch calls to something like below:
initialize: function () {
this._super();
var self = this;
totalsService.totals.subscribe(function () {
self._dispatchEvent();
});
shippingService.getShippingRates().subscribe(function () {
self._dispatchEvent();
});
},
_dispatchEvent: function () {
// backward compatibility with IE
var event = document.createEvent('Event');
event.initEvent('resize', true, true);
window.dispatchEvent(event);
}
Magento Versions
Magento 2.1 and develop branch.
mcspronko and okolesnyk
Metadata
Metadata
Assignees
Labels
Component: CheckoutIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report