jenkins-bot has submitted this change and it was merged.

Change subject: Check clipboardData exists before accessing it
......................................................................


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
---
M modules/ve/ce/ve.ce.Surface.js
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js
index da4bca0..957eacb 100644
--- a/modules/ve/ce/ve.ce.Surface.js
+++ b/modules/ve/ce/ve.ce.Surface.js
@@ -677,8 +677,8 @@
                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 );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/81540
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3cdf4c0358aa145dcb70c2c103d08a0002001fd4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to