.hasClass(".name") silently dies
|Reported by:||dmethvin||Owned by:||flesler|
If you erroneously use $().hasClass() with a leading dot on the class name, jQuery silently stops executing code in FF3.
The actual problem seems to be in jQuery.filter, which matches the leading ".." in the selector it's given and then tries to look that up in jQuery.expr and gets undefined, but still tries to call it as a function.
This clearly is a user input error case so I wouldn't say the actual return value is critical, but the fact that jQuery dies in an unusual way makes debugging hard.
Change History (7)
Changed 9 years ago by dmethvin
comment:1 Changed 9 years ago by flesler
- Cc dmethvin flesler added
- need changed from Review to Patch
- Owner set to flesler
- Status changed from new to assigned