Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Revert "Replaced vclick and click .bind by the equivalent document.ad…
Browse files Browse the repository at this point in the history
…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
gseguin committed Mar 8, 2012
1 parent ab825e4 commit d6e9fe5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/jquery.mobile.navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down Expand Up @@ -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;
}
Expand Down

1 comment on commit d6e9fe5

@scottjehl
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.