Modify ↓
Ticket #6938 (closed bug: fixed)
Blackberry 4.7: .attr("missing") returns ""
| Reported by: | john | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.4.3 |
| Component: | attributes | Version: | 1.4.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Should return undefined.
Change History
comment:2 Changed 2 years ago by anonymous
This fix is not really a fix This will fix the problem...
// Ensure that missing attributes return undefined
// Blackberry 4.7 returns "" from getAttribute #6938
if (elem.attributes == null ||!elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) {
return undefined;
}
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Fixed http://github.com/jquery/jquery/commit/cb40495b21bcb7802f3ab6ae0f837f2bf5b385ed