mediawiki.action.view.dblClickEdit: Fix undefined $content.
authorTimo Tijhof <ttijhof@wikimedia.org>
Wed, 6 Feb 2013 01:57:52 +0000 (17:57 -0800)
committerTimo Tijhof <ttijhof@wikimedia.org>
Wed, 6 Feb 2013 01:57:52 +0000 (17:57 -0800)
Regression from Ie8a35700.

Bug: 44522
Change-Id: I5f0388ae1307302bacebc9aa86bb83ceb82e30fb

resources/mediawiki.action/mediawiki.action.view.dblClickEdit.js

index c15fa0d..727a525 100644 (file)
@@ -1,10 +1,12 @@
 /**
 /**
- * This module enables double-click-to-edit functionality
+ * This module enables double-click-to-edit functionality.
  */
 ( function ( mw, $ ) {
  */
 ( function ( mw, $ ) {
-       mw.util.$content.dblclick( function ( e ) {
-               e.preventDefault();
-               // Trigger native HTMLElement click instead of opening URL (bug 43052)
-               $( '#ca-edit a' ).get( 0 ).click();
+       $( function () {
+               mw.util.$content.dblclick( function ( e ) {
+                       e.preventDefault();
+                       // Trigger native HTMLElement click instead of opening URL (bug 43052)
+                       $( '#ca-edit a' ).get( 0 ).click();
+               } );
        } );
 }( mediaWiki, jQuery ) );
        } );
 }( mediaWiki, jQuery ) );