Robmoen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/71118
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/18/71118/1
diff --git a/modules/ve/ce/ve.ce.FocusableNode.js
b/modules/ve/ce/ve.ce.FocusableNode.js
index 9b7c7ca..4bbf915 100644
--- a/modules/ve/ce/ve.ce.FocusableNode.js
+++ b/modules/ve/ce/ve.ce.FocusableNode.js
@@ -127,6 +127,9 @@
this.$.find( '*' ).add( this.$ ).each(
ve.bind( function( i, element ) {
elementOffset = $( element ).offset();
+ if ( !$( element ).is( ':visible' ) ) {
+ return true;
+ }
this.$highlights = this.$highlights.add(
$( '<div>' )
.css( {
--
To view, visit https://gerrit.wikimedia.org/r/71118
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2818423c26f5bbb2c056c3c94740d822be4f1b8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Robmoen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits