jenkins-bot has submitted this change and it was merged.
Change subject: Don't draw highlights over hidden elements.
......................................................................
Don't draw highlights over hidden elements.
Rational is that you wouldn't want to highlight something that is not
visible. And, obtaining offsets for hidden slugs in this case does not
return correct values.
Bug: 49818
Change-Id: Ic2818423c26f5bbb2c056c3c94740d822be4f1b8
---
M modules/ve/ce/ve.ce.FocusableNode.js
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
Christian: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve/ce/ve.ce.FocusableNode.js
b/modules/ve/ce/ve.ce.FocusableNode.js
index 9b7c7ca..c44a3e2 100644
--- a/modules/ve/ce/ve.ce.FocusableNode.js
+++ b/modules/ve/ce/ve.ce.FocusableNode.js
@@ -126,6 +126,9 @@
this.$.find( '*' ).add( this.$ ).each(
ve.bind( function( i, element ) {
+ if ( !$( element ).is( ':visible' ) ) {
+ return true;
+ }
elementOffset = $( element ).offset();
this.$highlights = this.$highlights.add(
$( '<div>' )
--
To view, visit https://gerrit.wikimedia.org/r/71118
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2818423c26f5bbb2c056c3c94740d822be4f1b8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Robmoen <[email protected]>
Gerrit-Reviewer: Christian <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits