jenkins-bot has submitted this change and it was merged.
Change subject: FocusableNode: Bind position events later
......................................................................
FocusableNode: Bind position events later
Wait until the node is focused before binding position events.
Mouse events aren't guaranteed to happen in pairs; leaving a
position event bound will be a massive performance drain as the
highlight will be redrawn on every keystroke.
Bug: T126348
Change-Id: If8c8792aebddba14a208d027b60a197954f5b340
---
M src/ce/ve.ce.FocusableNode.js
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Jforrester: Looks good to me, approved
jenkins-bot: Verified
diff --git a/src/ce/ve.ce.FocusableNode.js b/src/ce/ve.ce.FocusableNode.js
index 97b2878..77de54f 100644
--- a/src/ce/ve.ce.FocusableNode.js
+++ b/src/ce/ve.ce.FocusableNode.js
@@ -419,6 +419,7 @@
this.createHighlights();
this.focusableSurface.appendHighlights(
this.$highlights, this.focused );
this.focusableSurface.$element.off(
'.ve-ce-focusableNode' );
+ this.focusableSurface.connect( this, { position:
'positionHighlights' } );
} else {
this.emit( 'blur' );
this.$element.removeClass(
've-ce-focusableNode-focused' );
@@ -455,7 +456,6 @@
'mouseout.ve-ce-focusableNode':
this.onSurfaceMouseOut.bind( this )
} );
}
- this.focusableSurface.connect( this, { position: 'positionHighlights' }
);
};
/**
--
To view, visit https://gerrit.wikimedia.org/r/270750
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If8c8792aebddba14a208d027b60a197954f5b340
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits