-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Focusable: Fix handling of visibility: inherit
#1605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Focusable: Fix handling of visibility: inherit
#1605
Conversation
Ref #14596 Ref jquerygh-1583
Tests? |
Nevermind, saw your comment about IE8. Looks good to me. |
I can add a test that explicitly assigned |
That seems useful. |
}; | ||
|
||
function visible( element ) { | ||
var visibility = element.css( "visibility" ); | ||
while ( visibility === "inherit" ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this also check for element.length !== 0
to avoid a possible infinite loop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no possible infinite loop here. If the element doesn't exist, it can't have a visibility
of "inherit"
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course. 👍
Tests added. It turns out that even with these tests, only IE 8 will hit the new code path. All other browsers resolve |
Looks good. Somewhat related: medialize/ally.js#41 |
Ref #14596
Ref gh-1583