Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 1.05 KB

README.md

File metadata and controls

39 lines (28 loc) · 1.05 KB

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
);