Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Conditionally add a live handler to kill clicks on .ui-disabled eleme…

…nts when CSS pointer-events property is not supported. Fixes #3558

Conflicts:

	js/jquery.mobile.init.js
  • Loading branch information...
commit 5ed6ae3b6bf4d40c48224ca98c2a7ea22544732b 1 parent e083da4
@gseguin gseguin authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 js/jquery.mobile.init.js
View
13 js/jquery.mobile.init.js
@@ -192,6 +192,19 @@ define( [ "jquery", "./jquery.mobile.core", "./jquery.mobile.support", "./jquery
// window load event
// hide iOS browser chrome on load
$window.load( $.mobile.silentScroll );
+
+ if ( !$.support.cssPointerEvents ) {
+ // IE and Opera don't support CSS pointer-events: none that we use to disable link-based buttons
+ // by adding the 'ui-disabled' class to them. Using a JavaScript workaround for those browser.
+ // https://github.com/jquery/jquery-mobile/issues/3558
+
+ $( document ).delegate( ".ui-disabled", "vclick",
+ function( e ) {
+ e.preventDefault();
+ e.stopImmediatePropagation();
+ }
+ );
+ }
});
}( jQuery, this ));
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
Please sign in to comment.
Something went wrong with that request. Please try again.