From cc17f011f2beaab0c0c652b86b7052bef8d0b686 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Wed, 31 Jan 2018 06:37:54 +0100 Subject: [PATCH] jquery.textSelection: Remove final remnants of WikiEditor iframe support After WikiEditor's experimental iframe mode was removed in 952d6b9d8fc1d4ac606b6f8d0a3341ba7ec27e02, the code here was mostly removed in 62b4198859e4ac7cf41775dc8bc943272e3ddfc3, but this little stub remained to support CodeEditor (it piggy-backed on that feature to support textSelection() overrides). That was also cleaned up afterwards in 37228b257896e0a36816a61543ed5809e8ad6596, but everyone forgot about this little remnant. This code was not doing anything, as nothing sets the 'context.$iframe' property anymore, in any extension. Change-Id: I0ffe2405df7d6aaecc51b06ba6c7fea5fd8380b4 --- resources/src/jquery/jquery.textSelection.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/resources/src/jquery/jquery.textSelection.js b/resources/src/jquery/jquery.textSelection.js index 522e95b871..2b0c52749c 100644 --- a/resources/src/jquery/jquery.textSelection.js +++ b/resources/src/jquery/jquery.textSelection.js @@ -25,9 +25,6 @@ $.fn.textSelection = function ( command, options ) { var fn, alternateFn, - context, - hasWikiEditor, - needSave, retval; /** @@ -587,19 +584,7 @@ return; } - context = $( this ).data( 'wikiEditor-context' ); - hasWikiEditor = ( context !== undefined && context.$iframe !== undefined ); - - // IE selection restore voodoo - needSave = false; - if ( hasWikiEditor && context.savedSelection !== null ) { - context.fn.restoreSelection(); - needSave = true; - } retval = ( alternateFn && alternateFn[ command ] || fn[ command ] ).call( this, options ); - if ( hasWikiEditor && needSave ) { - context.fn.saveSelection(); - } return retval; }; -- 2.20.1