x-tag / core

The Heart of X-Tag
http://x-tag.github.io/
Other
1.25k stars 151 forks source link

bug with delegate events in IE11 #177

Open mutex12 opened 6 years ago

mutex12 commented 6 years ago

Found a bug with delegate events in IE11.

The prefix "pre" assignment doesn't return "ms" but returns "webkit".

Causing the "matchSelector" to become undefined and this stops "delegateAction" working.

x-tag-core.js (bad)

prefix = (function () { var keys = Object.keys(window).join(); var pre = ((keys.match(/,(ms)/) || keys.match(/,(moz)/) || keys.match(/,(O)/)) || [null, 'webkit'])[1].toLowerCase();

x-tag-components.js (good)

prefix = (function () { var styles = win.getComputedStyle(doc.documentElement, ''), pre = (Array.prototype.slice .call(styles) .join('') .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o']) )[1];

mutex12 commented 6 years ago

This is a dup of #172.