Bug Tracker

Opened 8 years ago

Closed 8 years ago

#11366 closed bug (invalid)

:target selector does not work in Webkit immediately after page ready/load

Reported by: blaisekal Owned by:
Priority: low Milestone: None
Component: selector Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

Description

Webkit cannot find $(':target') on body.load or window.ready. After a short timeout of 100ms, Webkit is able to find :target.

Firefox and Opera can find :target immediately. Haven't tested IE.

Created a test case: http://fiddle.jshell.net/83Pn5/show/light/#myid

Change History (1)

comment:1 Changed 8 years ago by sindresorhus

Component: unfiledselector
Priority: undecidedlow
Resolution: invalid
Status: newclosed

The ":target" selector is not supported in jQuery, and because of that, only works in browsers that support qSA, since jQuery will try to use qSA on these browsers.

Did a test with plain qSA and DOMContentLoaded event, and same problem. So definitely not a jQuery bug.

This Chrome bug might be relevant

Note: See TracTickets for help on using tickets.