mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
Check clipboardData exists before accessing it
Bug fix for browsers which don't have an event.clipboardData property. The check is done correctly in onCopy but not onPaste. Change-Id: I3cdf4c0358aa145dcb70c2c103d08a0002001fd4
This commit is contained in:
parent
f50102f521
commit
182d9bbeea
|
@ -677,8 +677,8 @@ ve.ce.Surface.prototype.onPaste = function ( e ) {
|
|||
view = this,
|
||||
selection = this.model.getSelection(),
|
||||
clipboardData = e.originalEvent.clipboardData,
|
||||
eventPasteKey = clipboardData.getData( 'text/xcustom' ) || null,
|
||||
eventPasteText = clipboardData.getData( 'text/plain' ) || null;
|
||||
eventPasteKey = clipboardData && clipboardData.getData( 'text/xcustom' ),
|
||||
eventPasteText = clipboardData && clipboardData.getData( 'text/plain' );
|
||||
|
||||
this.surfaceObserver.stop( false, true );
|
||||
|
||||
|
|
Loading…
Reference in a new issue