Opened 14 years ago
Closed 14 years ago
#4667 closed bug (notabug)
Self-closing div tags break tabs
Reported by: | xirzec | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.8 |
Component: | ui.tabs | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If you have a self-closing div tag inside of tab content, all content in following divs will not render.
Example:
<div id="tabs"> <ul>
<li><a href="#tab1">Tab1</a></li> <li><a href="#tab2">Tab2</a></li>
</ul> <div id="tab1">
<p>tab1</p> <div/>
</div> <div id="tab2">
<p>tab2</p>
</div> </div>
The text "tab2" will not be shown.
However if this is changed so the div is not self closing:
<div id="tabs"> <ul>
<li><a href="#tab1">Tab1</a></li> <li><a href="#tab2">Tab2</a></li>
</ul> <div id="tab1">
<p>tab1</p> <div></div>
</div> <div id="tab2">
<p>tab2</p>
</div> </div>
The problem vanishes.
Change History (3)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Milestone: | TBD → 1.8 |
---|
comment:3 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Self-closing DIV (<div/> instead of <div></div>) is invalid HTML. Valid self-closing HTML tags are AREA, BASE, BASEFONT, BR, HR, INPUT, IMG, LINK, and META. As such, what the browser does with <div/> is really out of our hands.
Whoops, forgot to do the wikiformatting:
and