mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 14:33:59 +00:00
Fix source copy when clipboardData not available
Bug: T190881 Change-Id: I8569dec0c03caa30cb7fcbbbfeed126dc9db57e4
This commit is contained in:
parent
5b36d88eae
commit
58054d49da
|
@ -61,7 +61,7 @@ ve.ce.MWWikitextSurface.prototype.onCopy = function ( e ) {
|
|||
|
||||
// Prevent surface observation due to native range changing
|
||||
this.surfaceObserver.disable();
|
||||
this.$pasteTarget.append( this.pasteTargetInput.$element );
|
||||
this.$pasteTarget.empty().append( this.pasteTargetInput.$element );
|
||||
this.pasteTargetInput.setValue( text ).select();
|
||||
|
||||
// Restore scroll position after changing focus
|
||||
|
@ -77,7 +77,7 @@ ve.ce.MWWikitextSurface.prototype.onCopy = function ( e ) {
|
|||
view.surfaceObserver.clear();
|
||||
view.surfaceObserver.enable();
|
||||
// Detach input
|
||||
this.pasteTargetInput.$element.detach();
|
||||
view.pasteTargetInput.$element.detach();
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue