0.2.0 • Published 10 years ago

ie-touch v0.2.0

Weekly downloads
21
License
-
Repository
github
Last release
10 years ago

ie-touch

W3C Touch Events for IE10 and IE11 Mobile (prior to WP 8.1 Update)

MIT Style License

How To

Just include this file on top of your header, before every other script you might have in your page.

Please note this file will not compromise any other browser, including latest IE11, that has native support for Touch Events.

CSS

In order to disable default OS behaviors on elements, don't forget to add the following:

.disablePanZoom {
  -ms-touch-action: none;
  touch-action: none;
}

and include disablePanZoom in the generic element class list.

JS

In order to avoid text selection (brute force way) you might want to try the following:

element.addEventListener(
  "selectstart",
  function(e) { e.preventDefault(); },
  false
);