From 0bcbfeb3377ded3292ee021e293b71638c9c821b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Thu, 3 Apr 2014 22:34:08 +0200 Subject: [PATCH] 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 --- .../mediawiki.action/mediawiki.action.edit.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) 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 ) ); -- 2.20.1