Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Replaced vclick and click .bind by the equivalent document.addEventLi…

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

As of jQuery 1.7 delegated event handlers are run before bound handlers. This change ensure that these handlers are run before the ones handled by jQuery. Fixes #3686
  • Loading branch information...
commit b52d7cadf5518720766abdee38911d7ad4cab295 1 parent 3a90c79
@gseguin gseguin authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 js/
4 js/
@@ -1211,7 +1211,7 @@ define( [
//add active state on vclick
- $( document ).bind( "vclick", function( event ) {
+ document.addEventListener( $.support.touch?"touchstart":"click", function( event ) {
@gseguin Collaborator
gseguin added a note

This is not exactly equivalent but should work in our case since we use that handler to give visual feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
// 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 ).bind( "click", function( event ) {
+ document.addEventListener( "click", function( event ) {
if( !$.mobile.linkBindingEnabled ){

0 comments on commit b52d7ca

Please sign in to comment.
Something went wrong with that request. Please try again.