Permalink
Browse files

Revert "Replaced vclick and click .bind by the equivalent document.ad…

…dEventListener. This is to ensure that these handlers will be the first to run on vclick and click."

This reverts commit b52d7ca.
  • Loading branch information...
1 parent ab825e4 commit d6e9fe5da7455cfba20bb44a539d70602b8b729b @gseguin gseguin committed Mar 8, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 js/jquery.mobile.navigation.js
@@ -1211,7 +1211,7 @@ define( [
});
//add active state on vclick
- document.addEventListener( $.support.touch?"touchstart":"click", function( event ) {
+ $( document ).bind( "vclick", function( event ) {
// if this isn't a left click we don't care. Its important to note
// that when the virtual event is generated it will create the which attr
if ( event.which > 1 || !$.mobile.linkBindingEnabled ) {
@@ -1243,7 +1243,7 @@ define( [
});
// click routing - direct to HTTP or Ajax, accordingly
- document.addEventListener( "click", function( event ) {
+ $( document ).bind( "click", function( event ) {
if( !$.mobile.linkBindingEnabled ){
return;
}

1 comment on commit d6e9fe5

Contributor

scottjehl commented on d6e9fe5 Mar 9, 2012

Ah, glad to see this was reverted. bind brings a lot of normalization, like older IE support for one. Tricky issue here though...

Please sign in to comment.