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

:visible selector including invisible elements #2604

Closed
FesterCluck opened this Issue Sep 20, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@FesterCluck

Please see my comment on #2227

For quick review, an example fix addressing the issue.

If #2227 is reopened, please close this issue.

@gibson042

This comment has been minimized.

Show comment
Hide comment
@gibson042

gibson042 Sep 20, 2015

Member

An approach like you suggest was tried and abandoned (more than once, in fact) because of cross-browser inconsistencies (see http://bugs.jquery.com/ticket/10406 and http://bugs.jquery.com/ticket/13132). The current model essentially defines :visible as having a position in the page, and seems to sidestep both those issues and performance degradations of other implementations You are free to filter selected elements further; another benefit from our perspective is that this is the broadest meaningful definition. Or is your use case one in which the reliance on custom selectors is deeply buried?

Member

gibson042 commented Sep 20, 2015

An approach like you suggest was tried and abandoned (more than once, in fact) because of cross-browser inconsistencies (see http://bugs.jquery.com/ticket/10406 and http://bugs.jquery.com/ticket/13132). The current model essentially defines :visible as having a position in the page, and seems to sidestep both those issues and performance degradations of other implementations You are free to filter selected elements further; another benefit from our perspective is that this is the broadest meaningful definition. Or is your use case one in which the reliance on custom selectors is deeply buried?

@FesterCluck

This comment has been minimized.

Show comment
Hide comment
@FesterCluck

FesterCluck Sep 20, 2015

Not so much. After spending more time with the DOM, it seems this case only really comes up in anchor tags, which already has a resolution with this. One /might/ consider a length > 1, or at least a check on ClientRectList[1].width/height if [0] is hidden, but at this point it's just academic. In all cases I've tested for actual behavior, my suggestion is just overhead. Consider the request withdrawn. Thank you all for your hard work.

Not so much. After spending more time with the DOM, it seems this case only really comes up in anchor tags, which already has a resolution with this. One /might/ consider a length > 1, or at least a check on ClientRectList[1].width/height if [0] is hidden, but at this point it's just academic. In all cases I've tested for actual behavior, my suggestion is just overhead. Consider the request withdrawn. Thank you all for your hard work.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.