mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
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
This commit is contained in:
parent
9e81731ff1
commit
57673643a2
|
@ -126,6 +126,9 @@ ve.ce.FocusableNode.prototype.createHighlight = function () {
|
||||||
|
|
||||||
this.$.find( '*' ).add( this.$ ).each(
|
this.$.find( '*' ).add( this.$ ).each(
|
||||||
ve.bind( function( i, element ) {
|
ve.bind( function( i, element ) {
|
||||||
|
if ( !$( element ).is( ':visible' ) ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
elementOffset = $( element ).offset();
|
elementOffset = $( element ).offset();
|
||||||
this.$highlights = this.$highlights.add(
|
this.$highlights = this.$highlights.add(
|
||||||
$( '<div>' )
|
$( '<div>' )
|
||||||
|
|
Loading…
Reference in a new issue