Merge "maintenance: Script to rename titles for Unicode uppercasing changes"
[lhc/web/wiklou.git] / resources / src / mediawiki.action / mediawiki.action.view.dblClickEdit.js
index e359416..7b7c70d 100644 (file)
@@ -3,16 +3,16 @@
  */
 ( function () {
        $( function () {
-               mw.util.$content.dblclick( function ( e ) {
+               mw.util.$content.on( 'dblclick', function ( e ) {
                        var $a;
                        // Recheck preference so extensions can do a hack to disable this code.
                        if ( parseInt( mw.user.options.get( 'editondblclick' ), 10 ) ) {
-                               e.preventDefault();
                                // Trigger native HTMLElement click instead of opening URL (T45052)
                                $a = $( '#ca-edit a' );
                                // Not every page has an edit link (T59713)
                                if ( $a.length ) {
-                                       // eslint-disable-next-line jquery/no-event-shorthand
+                                       e.preventDefault();
+                                       // eslint-disable-next-line no-jquery/no-event-shorthand
                                        $a.get( 0 ).click();
                                }
                        }