Opened 14 years ago
Closed 14 years ago
#4559 closed bug (duplicate)
AREA tag can't be created with inline attributes in Firefox
Reported by: | borg42 | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | unfiled | Version: | 1.3.2 |
Keywords: | area map firefox browser_dependent | Cc: | |
Blocked by: | Blocking: |
Description
Eg. the following works in IE7 but not in FF3 (where its .length is 0):
$('<area alt="something" />')
Test case attached.
Using Windows XP SP2, IE 7.0.5730.13, FF 3.0.8, jQuery 1.3.2 min.
(Prio somewhere between major and minor...)
Attachments (1)
Change History (6)
Changed 14 years ago by
Attachment: | area1.html added |
---|
comment:1 Changed 14 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
This is a dup of #4484.
comment:2 Changed 14 years ago by
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
I believe this ticket is not a duplicate.
4484 says (if I got it right) that when you use html() for an element, you need to support a parameter that's valid html in a div.
4559 reports you can create an AREA tag (test 1 passes), but you can't support inline attributes to it (test 2-4 fails) - and only fails in FF.
If your argument was true, $('<area/>') and $('<li/>') would also fail as these are not valid html in the document/div scope - but they succeed, both in IE and in FF.
comment:3 follow-up: 4 Changed 14 years ago by
I agree they're not exactly the same but they seem to be pretty related. You are using XHTML 1.0 Transitional in your doc and that doctype says that AREA tags are only valid within a MAP. In particular,
alert($("<div><br /></div>").html()); // "<br>" alert($("<div><area /></div>").html()); // "" alert($("<map><area /></map>").html()); // "<area>"
These aren't dependent on jQuery; try it with bare DOM, a div, and .innerHTML.
Like I said in #4484, it may be possible to do a fix in jQuery.clean
(basically, detect AREA tags and wrap it in a map).
comment:4 Changed 14 years ago by
Replying to dmethvin:
I see your point, and I've RTFM; please set the ticket to duplicate and close it. :)
Please note that even though http://docs.jquery.com/Core/jQuery is adequately documented regarding this issue, http://docs.jquery.com/Html is not.
I'll open a new ticket with my feature request.
comment:5 Changed 14 years ago by
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
test case