summaryrefslogtreecommitdiff
path: root/resources/src/mediawiki.action/mediawiki.action.view.dblClickEdit.js
blob: 2ded40cf2f098c263be3fa4b359faa9761f1bd23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/*!
 * Enables double-click-to-edit functionality.
 */
( function ( mw, $ ) {
	$( 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 ) );