Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/130639
Change subject: jquery.textSelection: Remove hardcoded checks for removed WikiEditor iframe mode ...................................................................... jquery.textSelection: Remove hardcoded checks for removed WikiEditor iframe mode Bug: 29328 Change-Id: I6c813cb5601bf79375444b4a1c598218102ce321 --- M resources/src/jquery/jquery.textSelection.js 1 file changed, 2 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/39/130639/1 diff --git a/resources/src/jquery/jquery.textSelection.js b/resources/src/jquery/jquery.textSelection.js index 042db91..76e9601 100644 --- a/resources/src/jquery/jquery.textSelection.js +++ b/resources/src/jquery/jquery.textSelection.js @@ -24,9 +24,6 @@ $.fn.textSelection = function ( command, options ) { var fn, - context, - hasIframe, - needSave, retval; /** @@ -149,9 +146,6 @@ // See bug 35201. activateElementOnIE( this ); - if ( context ) { - context.fn.restoreCursorAndScrollTop(); - } if ( options.selectionStart !== undefined ) { $( this ).textSelection( 'setSelection', { 'start': options.selectionStart, 'end': options.selectionEnd } ); } @@ -531,18 +525,11 @@ // Position to start selection at start: undefined, // Position to end selection at. Defaults to start - end: undefined, - // Element to start selection in (iframe only) - startContainer: undefined, - // Element to end selection in (iframe only). Defaults to startContainer - endContainer: undefined + end: undefined }, options ); if ( options.end === undefined ) { options.end = options.start; - } - if ( options.endContainer === undefined ) { - options.endContainer = options.startContainer; } // FIXME: We may not need character position-based functions if we insert markers in the right places break; @@ -553,19 +540,7 @@ break; } - context = $( this ).data( 'wikiEditor-context' ); - hasIframe = context !== undefined && context && context.$iframe !== undefined; - - // IE selection restore voodoo - needSave = false; - if ( hasIframe && context.savedSelection !== null ) { - context.fn.restoreSelection(); - needSave = true; - } - retval = ( hasIframe ? context.fn : fn )[command].call( this, options ); - if ( hasIframe && needSave ) { - context.fn.saveSelection(); - } + retval = fn[command].call( this, options ); return retval; }; -- To view, visit https://gerrit.wikimedia.org/r/130639 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c813cb5601bf79375444b4a1c598218102ce321 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński <matma....@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits