Drop pointer-events fallback code now IE10 is Grade C
authorEd Sanders <esanders@wikimedia.org>
Thu, 22 Feb 2018 21:40:53 +0000 (21:40 +0000)
committerEd Sanders <esanders@wikimedia.org>
Thu, 22 Feb 2018 21:40:53 +0000 (21:40 +0000)
IE10 was the last supported browser without pointer-events.

Change-Id: I8e1637f527dd058fe2a5491896b0cdd7ac65b0ba

resources/src/mediawiki.special/mediawiki.special.unwatchedPages.css
resources/src/mediawiki.special/mediawiki.special.unwatchedPages.js

index 054f45f..69fec08 100644 (file)
@@ -4,6 +4,4 @@
 
 .mw-watch-link-disabled {
        pointer-events: none;
-       /* Fallback for older browsers not supporting pointer-events: none */
-       cursor: default;
 }
index 34c8bbd..0886f8c 100644 (file)
                                title = mw.util.getParamValue( 'title', $link.attr( 'href' ) );
                        // nice format
                        title = mw.Title.newFromText( title ).toText();
-                       // Disable link whilst we're busy to avoid double handling
-                       if ( $link.data( 'mwDisabled' ) ) {
-                               // mw-watch-link-disabled disables pointer-events which prevents the click event
-                               // from happening in the first place. In older browsers we kill the event here.
-                               return false;
-                       }
-                       $link.data( 'mwDisabled', true ).addClass( 'mw-watch-link-disabled' );
+                       $link.addClass( 'mw-watch-link-disabled' );
 
                        // Preload the notification module for mw.notify
                        mw.loader.load( 'mediawiki.notification' );
@@ -46,7 +40,7 @@
                        }
 
                        promise.always( function () {
-                               $link.data( 'mwDisabled', false ).removeClass( 'mw-watch-link-disabled' );
+                               $link.removeClass( 'mw-watch-link-disabled' );
                        } );
 
                        e.preventDefault();