Fix focusable highlights

!$element.is( ':visible' ) - jQuery .is() returns boolean based on the
parameter.

$element.not( ':visible' ) - jQuery .not() returns a filtered jQuery
collection with elements matching the parameter removed.

Change-Id: Iedf55f3453514ee710bbb6d702bbf9a5570a4a1d
This commit is contained in:
Christian Williams 2013-07-03 13:49:11 -07:00
parent 92c38eab85
commit 1e298ffbc0

View file

@ -152,7 +152,7 @@ ve.ce.FocusableNode.prototype.createHighlight = function () {
this.$.find( '*' ).add( this.$ ).each(
ve.bind( function( i, element ) {
var offset, $element = $( element );
if ( $element.not( ':visible' ) ) {
if ( !$element.is( ':visible' ) ) {
return true;
}
offset = ve.Element.getRelativePosition(