mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 08:10:35 +00:00
Fixed scroll jumping when pasting
Change-Id: I9607dee6d1b0ca1820a9da5f48966310214e5edf
This commit is contained in:
parent
11b1bd8884
commit
e216a6f8ab
|
@ -185,12 +185,7 @@ ve.ce.Surface.prototype.onPaste = function( e ) {
|
|||
var _this = this,
|
||||
insertionPoint = _this.getSelectionRange().start;
|
||||
|
||||
$('#paste')
|
||||
.html('')
|
||||
.show()
|
||||
.css( 'top', $(window).scrollTop() )
|
||||
.css( 'left', $(window).scrollLeft() )
|
||||
.focus();
|
||||
$('#paste').html('').show().focus();
|
||||
|
||||
setTimeout( function() {
|
||||
var pasteString = $('#paste').hide().text(),
|
||||
|
|
|
@ -87,7 +87,7 @@ ve.Surface.prototype.setupBaseElements = function() {
|
|||
'id': 'paste', //TODO: make 'paste' in surface stateful and remove this attrib
|
||||
'class': 'paste',
|
||||
'contenteditable': 'true',
|
||||
'style': 'height:1px;width:1px;display:none;opacity:0;position:absolute;'
|
||||
'style': 'height:1px;width:1px;overflow:hidden;position:fixed;display:none;opacity:0;top:0;left:0;'
|
||||
})
|
||||
);
|
||||
// Attach the base the the parent
|
||||
|
|
Loading…
Reference in a new issue