Catrope has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/155807

Change subject: Remove lies about event objects being passed through
......................................................................

Remove lies about event objects being passed through

onFocusChange is debounced now, so it doesn't get a jQuery.Event
object passed to it any more. It was trying to pass this
nonexistent object to onDocumentFocus() and onDocumentBlur(),
which were already ignoring it anyway.

Change-Id: Ic29cea2b15626715eb6ddaf4f87b5279ffae36b3
---
M src/ce/ve.ce.Surface.js
1 file changed, 3 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/07/155807/1

diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index 430b1d5..4cd58fb 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -402,10 +402,8 @@
 
 /**
  * Handle global focus change.
- *
- * @param {jQuery.Event} e focusin or focusout event
  */
-ve.ce.Surface.prototype.onFocusChange = function ( e ) {
+ve.ce.Surface.prototype.onFocusChange = function () {
        var hasFocus = false;
 
        // rangy.getSelection can throw an exception in FF
@@ -421,10 +419,10 @@
        } catch ( ex ) {}
 
        if ( hasFocus && !this.isFocused() ) {
-               this.onDocumentFocus( e );
+               this.onDocumentFocus();
        }
        if ( !hasFocus && this.isFocused() ) {
-               this.onDocumentBlur( e );
+               this.onDocumentBlur();
        }
 };
 
@@ -434,7 +432,6 @@
  * This is triggered by a global focusin/focusout event noticing a selection 
on the document.
  *
  * @method
- * @param {jQuery.Event} e focusin or focusout event
  * @fires focus
  */
 ve.ce.Surface.prototype.onDocumentFocus = function () {
@@ -458,7 +455,6 @@
  * This is triggered by a global focusin/focusout event noticing no selection 
on the document.
  *
  * @method
- * @param {jQuery.Event} e focusin or focusout event
  * @fires blur
  */
 ve.ce.Surface.prototype.onDocumentBlur = function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic29cea2b15626715eb6ddaf4f87b5279ffae36b3
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>

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

Reply via email to