Permalink
Browse files

Menu: Wrap menu items in a <div>

This avoids styling issues where ui-state-focus rules apply to submenus.

Fixes #10162
Closes gh-1342
  • Loading branch information...
tjvantoll committed Oct 25, 2014
1 parent 3002d46 commit de2ef2a585447cf75fc8d4a734c12aa2bbd028c2
View
@@ -25,14 +25,14 @@
<body>
<ul id="menu">
- <li class="ui-widget-header">Category 1</li>
- <li>Option 1</li>
- <li>Option 2</li>
- <li>Option 3</li>
- <li class="ui-widget-header">Category 2</li>
- <li>Option 4</li>
- <li>Option 5</li>
- <li>Option 6</li>
+ <li class="ui-widget-header"><div>Category 1</div></li>
+ <li><div>Option 1</div></li>
+ <li><div>Option 2</div></li>
+ <li><div>Option 3</div></li>
+ <li class="ui-widget-header"><div>Category 2</div></li>
+ <li><div>Option 4</div></li>
+ <li><div>Option 5</div></li>
+ <li><div>Option 6</div></li>
</ul>
<div class="demo-description">
View
@@ -22,38 +22,38 @@
<body>
<ul id="menu">
- <li class="ui-state-disabled">Aberdeen</li>
- <li>Ada</li>
- <li>Adamsville</li>
- <li>Addyston</li>
- <li>Delphi
+ <li class="ui-state-disabled"><div>Aberdeen</div></li>
+ <li><div>Ada</div></li>
+ <li><div>Adamsville</div></li>
+ <li><div>Addyston</div></li>
+ <li><div>Delphi</div>
<ul>
- <li class="ui-state-disabled">Ada</li>
- <li>Saarland</li>
- <li>Salzburg an der schönen Donau</li>
+ <li class="ui-state-disabled"><div>Ada</div></li>
+ <li><div>Saarland</div></li>
+ <li><div>Salzburg an der schönen Donau</div></li>
</ul>
</li>
- <li>Saarland</li>
- <li>Salzburg
+ <li><div>Saarland</div></li>
+ <li><div>Salzburg</div>
<ul>
- <li>Delphi
+ <li><div>Delphi</div>
<ul>
- <li>Ada</li>
- <li>Saarland</li>
- <li>Salzburg</li>
+ <li><div>Ada</div></li>
+ <li><div>Saarland</div></li>
+ <li><div>Salzburg</div></li>
</ul>
</li>
- <li>Delphi
+ <li><div>Delphi</div>
<ul>
- <li>Ada</li>
- <li>Saarland</li>
- <li>Salzburg</li>
+ <li><div>Ada</div></li>
+ <li><div>Saarland</div></li>
+ <li><div>Salzburg</div></li>
</ul>
</li>
- <li>Perch</li>
+ <li><div>Perch</div></li>
</ul>
</li>
- <li class="ui-state-disabled">Amesville</li>
+ <li class="ui-state-disabled"><div>Amesville</div></li>
</ul>
<div class="demo-description">
View
@@ -22,20 +22,38 @@
<body>
<ul id="menu">
- <li><span class="ui-icon ui-icon-disk"></span>Save</li>
- <li><span class="ui-icon ui-icon-zoomin"></span>Zoom In</li>
- <li><span class="ui-icon ui-icon-zoomout"></span>Zoom Out</li>
- <li class="ui-state-disabled"><span class="ui-icon ui-icon-print"></span>Print...</li>
<li>
- Playback
+ <div><span class="ui-icon ui-icon-disk"></span>Save</div>
+ </li>
+ <li>
+ <div><span class="ui-icon ui-icon-zoomin"></span>Zoom In</div>
+ </li>
+ <li>
+ <div><span class="ui-icon ui-icon-zoomout"></span>Zoom Out</div>
+ </li>
+ <li class="ui-state-disabled">
+ <div><span class="ui-icon ui-icon-print"></span>Print...</div>
+ </li>
+ <li>
+ <div>Playback</div>
<ul>
- <li><span class="ui-icon ui-icon-seek-start"></span>Prev</li>
- <li><span class="ui-icon ui-icon-stop"></span>Stop</li>
- <li><span class="ui-icon ui-icon-play"></span>Play</li>
- <li><span class="ui-icon ui-icon-seek-end"></span>Next</li>
+ <li>
+ <div><span class="ui-icon ui-icon-seek-start"></span>Prev</div>
+ </li>
+ <li>
+ <div><span class="ui-icon ui-icon-stop"></span>Stop</div>
+ </li>
+ <li>
+ <div><span class="ui-icon ui-icon-play"></span>Play</div>
+ </li>
+ <li>
+ <div><span class="ui-icon ui-icon-seek-end"></span>Next</div>
+ </li>
</ul>
</li>
- <li>Learn more about this menu</li>
+ <li>
+ <div>Learn more about this menu</div>
+ </li>
</ul>
<div class="demo-description">
Oops, something went wrong.

0 comments on commit de2ef2a

Please sign in to comment.