From: Bartosz DziewoƄski Date: Thu, 3 Apr 2014 20:34:08 +0000 (+0200) Subject: mediawiki.action.edit.js: Remove WikiEditor iframe hack from 2010 X-Git-Tag: 1.31.0-rc.0~16354^2 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=0bcbfeb3377ded3292ee021e293b71638c9c821b;p=lhc%2Fweb%2Fwiklou.git mediawiki.action.edit.js: Remove WikiEditor iframe hack from 2010 Introduced in aa69029e2 (r62242) by Roan. The iframe this refers to is going away for good in I2d736911. Change-Id: If2f225c51791b46e25468deb4081ecac67db409a --- diff --git a/resources/mediawiki.action/mediawiki.action.edit.js b/resources/mediawiki.action/mediawiki.action.edit.js index bbffe79a64..bcf2c40879 100644 --- a/resources/mediawiki.action/mediawiki.action.edit.js +++ b/resources/mediawiki.action/mediawiki.action.edit.js @@ -137,9 +137,9 @@ mw.toolbar = toolbar; $( function () { - var i, b, $iframe, editBox, scrollTop, $editForm; + var i, b, editBox, scrollTop, $editForm; - // currentFocus is used to determine where to insert tags + // Used to determine where to insert tags $currentFocused = $( '#wpTextbox1' ); // Populate the selector cache for $toolbar @@ -186,19 +186,6 @@ $( document ).on( 'focus', 'textarea, input:text', function () { $currentFocused = $( this ); } ); - - // HACK: make $currentFocused work with the usability iframe - // With proper focus detection support (HTML 5!) this'll be much cleaner - // TODO: Get rid of this WikiEditor code from MediaWiki core! - $iframe = $( '.wikiEditor-ui-text iframe' ); - if ( $iframe.length > 0 ) { - $( $iframe.get( 0 ).contentWindow.document ) - // for IE - .add( $iframe.get( 0 ).contentWindow.document.body ) - .focus( function () { - $currentFocused = $iframe; - } ); - } }); }( mediaWiki, jQuery ) );