Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basket Page - Shipping Estimator IE11 #70

Closed
influxweb opened this issue Aug 23, 2019 · 0 comments · Fixed by #79
Closed

Basket Page - Shipping Estimator IE11 #70

influxweb opened this issue Aug 23, 2019 · 0 comments · Fixed by #79
Assignees
Milestone

Comments

@influxweb
Copy link
Contributor

influxweb commented Aug 23, 2019

In Internet Explorer 11 the shipping estimator will open but, when submitted, the form will not process and the console will receive the error SCRIPT438: Object doesn't support property or method 'before'.

Expected Behavior

The form should function in all browsers without errors

Correcting the Issue

To correct the issue, a new function needs to be added to the polyfills.js file. I have added this update and it will be included in the next maintenance release.

To make the update prior to the next release, you will need to add this code in User Interface -> JavaScript Resources -> polyfills:

/**
 * A basic polyfill for the before() method in Internet Explorer 9 and higher.
 *
 * https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/before
 * https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/before()/before().md
 */
(function (arr) {
	arr.forEach(function (item) {
		if (item.hasOwnProperty('before')) {
			return;
		}
		Object.defineProperty(item, 'before', {
			configurable: true,
			enumerable: true,
			writable: true,
			value: function before() {
				var argArr = Array.prototype.slice.call(arguments);
				var docFrag = document.createDocumentFragment();

				argArr.forEach(function (argItem) {
					var isNode = argItem instanceof Node;

					docFrag.appendChild(isNode ? argItem : document.createTextNode(String(argItem)));
				});

				this.parentNode.insertBefore(docFrag, this);
			}
		});
	});
})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
@influxweb influxweb added this to the v1.0.6 milestone Aug 23, 2019
@influxweb influxweb self-assigned this Aug 23, 2019
influxweb added a commit that referenced this issue Oct 18, 2019
This maintenance release addresses all issues contained in the v1.0.6 milestone.
https://github.com/mivaecommerce/readytheme-shadows/milestone/7?closed=1

This closes #68, closes #69, closes #70, closes #71, closes #72, closes #73, closes #74, closes #75, closes #76, closes #77, and closes #78
@influxweb influxweb mentioned this issue Oct 18, 2019
influxweb added a commit that referenced this issue Oct 18, 2019
This maintenance release addresses all issues contained in the v1.0.6 milestone.
https://github.com/mivaecommerce/readytheme-shadows/milestone/7?closed=1

This closes #68, closes #69, closes #70, closes #71, closes #72, closes #73, closes #74, closes #75, closes #76, closes #77, and closes #78
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant