Put print click handler on link, not on list item
authorBrion Vibber <brion@pobox.com>
Sun, 21 May 2017 15:03:10 +0000 (17:03 +0200)
committerBrion Vibber <brion@pobox.com>
Sun, 21 May 2017 15:03:10 +0000 (17:03 +0200)
Was responding to clicks outside the link, which was confusing.

Bug: T24256
Change-Id: I22f7cf20a08bb4204b0442defeb7cfb83899b969

resources/src/mediawiki/page/ready.js

index 758e20a..1f6c8a6 100644 (file)
@@ -59,7 +59,7 @@
                        mw.hook( 'wikipage.categories' ).fire( $nodes );
                }
 
-               $( '#t-print' ).click( function ( e ) {
+               $( '#t-print a' ).click( function ( e ) {
                        window.print();
                        e.preventDefault();
                } );