Side navigation
#4321 closed bug (fixed)
Opened March 10, 2009 01:15PM UTC
Closed April 06, 2011 02:18AM UTC
Last modified March 09, 2012 10:09AM UTC
$("#") returns undefined
Reported by: | vkvkvk | Owned by: | rwaldron |
---|---|---|---|
Priority: | low | Milestone: | 1.6 |
Component: | selector | Version: | 1.4.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$("#") returns "undefined".
Opera ver 9.6 throws exception.
Old version JQuery returns JQuery object (length=0)
Attachments (0)
Change History (10)
Changed August 09, 2009 01:27AM UTC by comment:1
component: | unfilled → selector |
---|---|
owner: | → john |
Changed October 29, 2009 05:19AM UTC by comment:2
Seems like a pretty specific and rare special case that isn't worth expanding the code base to fix. That said I think this might work and not require any more code (needs more testing though):
Change
quickExpr = /^[^<]*(<(.|\\s)+>)[^>]*$|^#([\\w-]+)$/
to
quickExpr = /^[^<]*(<(.|\\s)+>)[^>]*$|^#([\\w-]*)$/
which is just changing + which requires at least one character to * which doesn't (this special case where input is "#").
Changed October 27, 2010 01:04AM UTC by comment:3
keywords: | → regression |
---|---|
milestone: | 1.4 → 1.4.4 |
priority: | major → low |
status: | new → open |
version: | 1.3.2 → 1.4.3 |
Confirmed; However this is not documented in the API as a valid selector, however IS a regression in behaviour
exception thrown in 1.4.4rc1
http://jsfiddle.net/rwaldron/eHtAU/2/
passes with 1.2.6
Changed October 27, 2010 09:42PM UTC by comment:4
keywords: | regression → regression needsreview |
---|---|
milestone: | 1.4.4 |
Retargeting to future since this is not likely to actually affect anyone.
Changed December 27, 2010 10:25PM UTC by comment:5
owner: | john → rwaldron |
---|---|
status: | open → assigned |
Changed January 01, 2011 10:51PM UTC by comment:6
Changed March 31, 2011 02:05AM UTC by comment:7
keywords: | regression needsreview → regression needsreview pullreq |
---|---|
milestone: | → 1.next |
Changed April 01, 2011 02:32AM UTC by comment:8
keywords: | regression needsreview pullreq |
---|
Changed April 06, 2011 02:18AM UTC by comment:9
resolution: | → fixed |
---|---|
status: | assigned → closed |
Landed pull 160.
Changed April 06, 2011 02:18AM UTC by comment:10
milestone: | 1.next → 1.6 |
---|
It's an error case...I guess it should return an empty object though.