doesn´t work in IE 11
hi! what i did as you described:
<script type="text/javascript">
$(document).ready(function(){
PointerEventsPolyfill.initialize({});
});
</script>
do i miss something?
thank you! regards strmiska
Hi Hitchio!
pointer-events are supported in IE 11, so you shouldn't need to add this polyfill for that browser version. Here's the supported browsers: http://caniuse.com/pointer-events
If you want to feature detect with Modernizr, you can add this detector:
Modernizr.addTest('pointerevents',function(){
return 'pointerEvents' in document.documentElement.style;
})
Credit goes to: https://github.com/Modernizr/Modernizr/issues/80
I actually had an issue with IE 11 and using pointer-events:none; I believe it was because I was referencing a select tag. As a getaround I passed in the uePolyfillif function to force all IE use. This worked for me i.e.
PointerEventsPolyfill.initialize({
usePolyfillIf:function(){
var ua = window.navigator.userAgent;
var old_ie = ua.indexOf('MSIE ');
var new_ie = ua.indexOf('Trident/');
if ((old_ie > -1) || (new_ie > -1)) {
return true;}
else {
return false;}
}
});
HOWEVER, there is still an issue with it not working for IE8 (not sure if that's due to the select tags as well or a known bug).
Hope this helps