mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Menu: Remove default preventDefault. Add more meaningful href's on menu
and menubar demos. Change doesn't seem to affect autocomplete as that doesn't use href-attributes anyway.
This commit is contained in:
parent
c17f245d98
commit
0352c2c71f
@ -37,14 +37,14 @@
|
|||||||
|
|
||||||
<button>Select a city</button>
|
<button>Select a city</button>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#">Amsterdam</a></li>
|
<li><a href="#Amsterdam">Amsterdam</a></li>
|
||||||
<li><a href="#">Anaheim</a></li>
|
<li><a href="#Anaheim">Anaheim</a></li>
|
||||||
<li><a href="#">Cologne</a></li>
|
<li><a href="#Cologne">Cologne</a></li>
|
||||||
<li><a href="#">Frankfurt</a></li>
|
<li><a href="#Frankfurt">Frankfurt</a></li>
|
||||||
<li><a href="#">Magdeburg</a></li>
|
<li><a href="#Magdeburg">Magdeburg</a></li>
|
||||||
<li><a href="#">Munich</a></li>
|
<li><a href="#Munich">Munich</a></li>
|
||||||
<li><a href="#">Utrecht</a></li>
|
<li><a href="#Utrecht">Utrecht</a></li>
|
||||||
<li><a href="#">Zurich</a></li>
|
<li><a href="#Zurich">Zurich</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div id="log"></div>
|
<div id="log"></div>
|
||||||
|
@ -23,21 +23,21 @@
|
|||||||
<div class="demo">
|
<div class="demo">
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#">Aberdeen</a></li>
|
<li><a href="#Aberdeen">Aberdeen</a></li>
|
||||||
<li><a href="#">Ada</a></li>
|
<li><a href="#Ada">Ada</a></li>
|
||||||
<li><a href="#">Adamsville</a></li>
|
<li><a href="#Adamsville">Adamsville</a></li>
|
||||||
<li><a href="#">Addyston</a></li>
|
<li><a href="#Addyston">Addyston</a></li>
|
||||||
<li><a href="#">Adelphi</a></li>
|
<li><a href="#Adelphi">Adelphi</a></li>
|
||||||
<li><a href="#">Adena</a></li>
|
<li><a href="#Adena">Adena</a></li>
|
||||||
<li><a href="#">Adrian</a></li>
|
<li><a href="#Adrian">Adrian</a></li>
|
||||||
<li><a href="#">Akron</a></li>
|
<li><a href="#Akron">Akron</a></li>
|
||||||
<li><a href="#">Albany</a></li>
|
<li><a href="#Albany">Albany</a></li>
|
||||||
<li><a href="#">Alexandria</a></li>
|
<li><a href="#Alexandria">Alexandria</a></li>
|
||||||
<li><a href="#">Alger</a></li>
|
<li><a href="#Alger">Alger</a></li>
|
||||||
<li><a href="#">Alledonia</a></li>
|
<li><a href="#Alledonia">Alledonia</a></li>
|
||||||
<li><a href="#">Alliance</a></li>
|
<li><a href="#Alliance">Alliance</a></li>
|
||||||
<li><a href="#">Alpha</a></li>
|
<li><a href="#Alpha">Alpha</a></li>
|
||||||
<li><a href="#">Alvada</a></li>
|
<li><a href="#Alvada">Alvada</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div><!-- End demo -->
|
</div><!-- End demo -->
|
||||||
|
@ -70,92 +70,92 @@
|
|||||||
<div class="demo">
|
<div class="demo">
|
||||||
<ul id="bar1" class="menubar">
|
<ul id="bar1" class="menubar">
|
||||||
<li>
|
<li>
|
||||||
<a href="#">File</a>
|
<a href="#File">File</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#">Open...</a></li>
|
<li><a href="#Open...">Open...</a></li>
|
||||||
<li class="ui-state-disabled">Open recent...</li>
|
<li class="ui-state-disabled">Open recent...</li>
|
||||||
<li><a href="#">Save</a></li>
|
<li><a href="#Save">Save</a></li>
|
||||||
<li><a href="#">Save as...</a></li>
|
<li><a href="#Save as...">Save as...</a></li>
|
||||||
<li><a href="#">Close</a></li>
|
<li><a href="#Close">Close</a></li>
|
||||||
<li><a href="#">Quit</a></li>
|
<li><a href="#Quit">Quit</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#">Edit</a>
|
<a href="#Edit">Edit</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#">Copy</a></li>
|
<li><a href="#Copy">Copy</a></li>
|
||||||
<li><a href="#">Cut</a></li>
|
<li><a href="#Cut">Cut</a></li>
|
||||||
<li class="ui-state-disabled">Paste</li>
|
<li class="ui-state-disabled">Paste</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#">View</a>
|
<a href="#View">View</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#">Fullscreen</a></li>
|
<li><a href="#Fullscreen">Fullscreen</a></li>
|
||||||
<li><a href="#">Fit into view</a></li>
|
<li><a href="#Fit into view">Fit into view</a></li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#">Encoding</a>
|
<a href="#Encoding">Encoding</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#">Auto-detect</a></li>
|
<li><a href="#Auto-detect">Auto-detect</a></li>
|
||||||
<li><a href="#">UTF-8</a></li>
|
<li><a href="#UTF-8">UTF-8</a></li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#">UTF-16</a>
|
<a href="#UTF-16">UTF-16</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#">Option 1</a></li>
|
<li><a href="#Option 1">Option 1</a></li>
|
||||||
<li><a href="#">Option 2</a></li>
|
<li><a href="#Option 2">Option 2</a></li>
|
||||||
<li><a href="#">Option 3</a></li>
|
<li><a href="#Option 3">Option 3</a></li>
|
||||||
<li><a href="#">Option 4</a></li>
|
<li><a href="#Option 4">Option 4</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#">Customize...</a></li>
|
<li><a href="#Customize...">Customize...</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul id="bar2" class="menubar-icons">
|
<ul id="bar2" class="menubar-icons">
|
||||||
<li>
|
<li>
|
||||||
<a href="#">File</a>
|
<a href="#File">File</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#">Open...</a></li>
|
<li><a href="#Open...">Open...</a></li>
|
||||||
<li class="ui-state-disabled">Open recent...</li>
|
<li class="ui-state-disabled">Open recent...</li>
|
||||||
<li><a href="#">Save</a></li>
|
<li><a href="#Save">Save</a></li>
|
||||||
<li><a href="#">Save as...</a></li>
|
<li><a href="#Save as...">Save as...</a></li>
|
||||||
<li><a href="#">Close</a></li>
|
<li><a href="#Close">Close</a></li>
|
||||||
<li><a href="#">Quit</a></li>
|
<li><a href="#Quit">Quit</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#">Edit</a>
|
<a href="#Edit">Edit</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#">Copy</a></li>
|
<li><a href="#Copy">Copy</a></li>
|
||||||
<li><a href="#">Cut</a></li>
|
<li><a href="#Cut">Cut</a></li>
|
||||||
<li class="ui-state-disabled">Paste</li>
|
<li class="ui-state-disabled">Paste</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#">View</a>
|
<a href="#View">View</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#">Fullscreen</a></li>
|
<li><a href="#Fullscreen">Fullscreen</a></li>
|
||||||
<li><a href="#">Fit into view</a></li>
|
<li><a href="#Fit into view">Fit into view</a></li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#">Encoding</a>
|
<a href="#Encoding">Encoding</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#">Auto-detect</a></li>
|
<li><a href="#Auto-detect">Auto-detect</a></li>
|
||||||
<li><a href="#">UTF-8</a></li>
|
<li><a href="#UTF-8">UTF-8</a></li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#">UTF-16</a>
|
<a href="#UTF-16">UTF-16</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#">Option 1</a></li>
|
<li><a href="#Option 1">Option 1</a></li>
|
||||||
<li><a href="#">Option 2</a></li>
|
<li><a href="#Option 2">Option 2</a></li>
|
||||||
<li><a href="#">Option 3</a></li>
|
<li><a href="#Option 3">Option 3</a></li>
|
||||||
<li><a href="#">Option 4</a></li>
|
<li><a href="#Option 4">Option 4</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#">Customize...</a></li>
|
<li><a href="#Customize...">Customize...</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -178,19 +178,19 @@
|
|||||||
<td class="ui-widget-content">
|
<td class="ui-widget-content">
|
||||||
<ul class="menubar">
|
<ul class="menubar">
|
||||||
<li>
|
<li>
|
||||||
<a href="#">Options</a>
|
<a href="#Options">Options</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#">Order...</a></li>
|
<li><a href="#Order...">Order...</a></li>
|
||||||
<li class="ui-state-disabled">Write a Review...</li>
|
<li class="ui-state-disabled">Write a Review...</li>
|
||||||
<li><a href="#">Find Similar Movies...</a></li>
|
<li><a href="#Find Similar Movies...">Find Similar Movies...</a></li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#">Rate</a>
|
<a href="#Rate">Rate</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#">5 stars</a></li>
|
<li><a href="#5 stars">5 stars</a></li>
|
||||||
<li><a href="#">4 stars</a></li>
|
<li><a href="#4 stars">4 stars</a></li>
|
||||||
<li><a href="#">3 stars</a></li>
|
<li><a href="#3 stars">3 stars</a></li>
|
||||||
<li><a href="#">2 stars</a></li>
|
<li><a href="#2 stars">2 stars</a></li>
|
||||||
<li><a href="#">1 stars</a></li>
|
<li><a href="#1 stars">1 stars</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
2
ui/jquery.ui.menu.js
vendored
2
ui/jquery.ui.menu.js
vendored
@ -45,8 +45,6 @@ $.widget("ui.menu", {
|
|||||||
if ( !item.length ) {
|
if ( !item.length ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// temporary
|
|
||||||
event.preventDefault();
|
|
||||||
// it's possible to click an item without hovering it (#7085)
|
// it's possible to click an item without hovering it (#7085)
|
||||||
if ( !self.active || ( self.active[ 0 ] !== item[ 0 ] ) ) {
|
if ( !self.active || ( self.active[ 0 ] !== item[ 0 ] ) ) {
|
||||||
self.focus( event, item );
|
self.focus( event, item );
|
||||||
|
Loading…
Reference in New Issue
Block a user