Skip to content

Instantly share code, notes, and snippets.

@baluubas
Created May 4, 2014 09:02
Show Gist options
  • Save baluubas/e10756755c114a067e75 to your computer and use it in GitHub Desktop.
Save baluubas/e10756755c114a067e75 to your computer and use it in GitHub Desktop.
MSPointerDown target is wrong (Windows Phone 8.0)
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=device-width, user-scalable=no">
<style type="text/css">
.pane {
top: 0;
right: 0;
bottom: 0;
left: 0;
position: fixed;
}
</style>
</head>
<body>
<div id="page" class="pane" style="background-color: green;">
<button id="btn" style="width: 320px; height: 300px; z-index: 1;"><div>hello</div></button>
</div>
<div id="modal" class="pane" style="background-color: blue; z-index: 2;"><div>
<script>
document.body.addEventListener('MSPointerDown', function(e) {
alert('target: ' + e.target.id);
}, false);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment