pukhalski / tap

1Kb library for easy unified handling of user interactions such as mouse, touch and pointer events.
https://github.com/pukhalski/tap/archive/master.zip
MIT License
527 stars 45 forks source link

Fix preventing default behavior of events in windows phone #17

Closed ezhlobo closed 9 years ago

ezhlobo commented 9 years ago

Correct preventing of link executing in WP8.

Test case:

<a id="link" href="http://www.google.com">link to google</a>

<div id="console" style="font-family: Consolas, Courier New, monospace"></div>

<script type="text/javascript">
document.getElementById( 'link' ).addEventListener( 'tap', function ( e ) {
    e.preventDefault();
    document.getElementById( 'console' ).innerHTML += '<p>Tap event</p>';
});
</script>