Divec has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/382971 )

Change subject: Don't assume events have an originalEvent object
......................................................................

Don't assume events have an originalEvent object

Because jQuery synthetic events do not

Bug: T176104
Change-Id: I7a712480ec1afd5194a0fe8d93b14110084f2c95
---
M src/ce/ve.ce.Surface.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/71/382971/1

diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index b81f76c..66d3860 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -2453,7 +2453,7 @@
  * @param {jQuery.Event} e The input event
  */
 ve.ce.Surface.prototype.onDocumentInput = function ( e ) {
-       var inputType = e.originalEvent.inputType;
+       var inputType = ( e.originalEvent && e.originalEvent.inputType );
 
        if ( inputType && inputType in 
this.constructor.static.inputTypeCommands ) {
                this.getSurface().executeCommand( 
this.constructor.static.inputTypeCommands[ inputType ] );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7a712480ec1afd5194a0fe8d93b14110084f2c95
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Divec <da...@troi.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to