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:
Rob Moen 2013-06-28 13:46:08 -07:00
parent 9e81731ff1
commit 57673643a2

View file

@ -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>' )