Fixed scroll jumping when pasting

Change-Id: I9607dee6d1b0ca1820a9da5f48966310214e5edf
This commit is contained in:
Christian Williams 2012-05-30 13:06:19 -07:00
parent 11b1bd8884
commit e216a6f8ab
2 changed files with 2 additions and 7 deletions

View file

@ -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(),

View file

@ -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