mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-27 17:50:44 +00:00
Realtime Preview: scroll to cursor when opening/closing RTP
Bug: T311684 Follow-Up: I377fb3a122cda360e016716e3beb9c34983b8e10 Change-Id: Ic5c56f71589c944b15b83b49362fc250cb337c46
This commit is contained in:
parent
4d02fb808b
commit
770277689a
|
@ -202,6 +202,7 @@ RealtimePreview.prototype.toggle = function ( saveUserPref ) {
|
|||
|
||||
// Restore current selection.
|
||||
$textarea.textSelection( 'setSelection', { start: cursorPos[ 0 ], end: cursorPos[ 1 ] } );
|
||||
$textarea.textSelection( 'scrollToCaretPosition' );
|
||||
// Focus on whatever had focus before, in case it wasn't the textarea.
|
||||
focusedElement.focus();
|
||||
|
||||
|
|
Loading…
Reference in a new issue