aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2011-05-11 13:39:58 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2011-05-11 13:39:58 +0200
commit0352c2c71f32553612301f57741f249476234746 (patch)
treef8465bd5dadc7f9fe5cd5db9bce7b974142837cb
parentc17f245d9848ae865d400dabb02ea954aa8da645 (diff)
downloadjquery-ui-0352c2c71f32553612301f57741f249476234746.tar.gz
jquery-ui-0352c2c71f32553612301f57741f249476234746.zip
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.
-rw-r--r--demos/menu/contextmenu.html16
-rw-r--r--demos/menu/default.html30
-rw-r--r--demos/menubar/default.html102
-rw-r--r--ui/jquery.ui.menu.js2
4 files changed, 74 insertions, 76 deletions
diff --git a/demos/menu/contextmenu.html b/demos/menu/contextmenu.html
index 115f15b24..7513bca28 100644
--- a/demos/menu/contextmenu.html
+++ b/demos/menu/contextmenu.html
@@ -37,14 +37,14 @@
<button>Select a city</button>
<ul>
- <li><a href="#">Amsterdam</a></li>
- <li><a href="#">Anaheim</a></li>
- <li><a href="#">Cologne</a></li>
- <li><a href="#">Frankfurt</a></li>
- <li><a href="#">Magdeburg</a></li>
- <li><a href="#">Munich</a></li>
- <li><a href="#">Utrecht</a></li>
- <li><a href="#">Zurich</a></li>
+ <li><a href="#Amsterdam">Amsterdam</a></li>
+ <li><a href="#Anaheim">Anaheim</a></li>
+ <li><a href="#Cologne">Cologne</a></li>
+ <li><a href="#Frankfurt">Frankfurt</a></li>
+ <li><a href="#Magdeburg">Magdeburg</a></li>
+ <li><a href="#Munich">Munich</a></li>
+ <li><a href="#Utrecht">Utrecht</a></li>
+ <li><a href="#Zurich">Zurich</a></li>
</ul>
<div id="log"></div>
diff --git a/demos/menu/default.html b/demos/menu/default.html
index 7a1dd99e7..40386112f 100644
--- a/demos/menu/default.html
+++ b/demos/menu/default.html
@@ -23,21 +23,21 @@
<div class="demo">
<ul>
- <li><a href="#">Aberdeen</a></li>
- <li><a href="#">Ada</a></li>
- <li><a href="#">Adamsville</a></li>
- <li><a href="#">Addyston</a></li>
- <li><a href="#">Adelphi</a></li>
- <li><a href="#">Adena</a></li>
- <li><a href="#">Adrian</a></li>
- <li><a href="#">Akron</a></li>
- <li><a href="#">Albany</a></li>
- <li><a href="#">Alexandria</a></li>
- <li><a href="#">Alger</a></li>
- <li><a href="#">Alledonia</a></li>
- <li><a href="#">Alliance</a></li>
- <li><a href="#">Alpha</a></li>
- <li><a href="#">Alvada</a></li>
+ <li><a href="#Aberdeen">Aberdeen</a></li>
+ <li><a href="#Ada">Ada</a></li>
+ <li><a href="#Adamsville">Adamsville</a></li>
+ <li><a href="#Addyston">Addyston</a></li>
+ <li><a href="#Adelphi">Adelphi</a></li>
+ <li><a href="#Adena">Adena</a></li>
+ <li><a href="#Adrian">Adrian</a></li>
+ <li><a href="#Akron">Akron</a></li>
+ <li><a href="#Albany">Albany</a></li>
+ <li><a href="#Alexandria">Alexandria</a></li>
+ <li><a href="#Alger">Alger</a></li>
+ <li><a href="#Alledonia">Alledonia</a></li>
+ <li><a href="#Alliance">Alliance</a></li>
+ <li><a href="#Alpha">Alpha</a></li>
+ <li><a href="#Alvada">Alvada</a></li>
</ul>
</div><!-- End demo -->
diff --git a/demos/menubar/default.html b/demos/menubar/default.html
index be49b4589..79662bd9f 100644
--- a/demos/menubar/default.html
+++ b/demos/menubar/default.html
@@ -70,92 +70,92 @@
<div class="demo">
<ul id="bar1" class="menubar">
<li>
- <a href="#">File</a>
+ <a href="#File">File</a>
<ul>
- <li><a href="#">Open...</a></li>
+ <li><a href="#Open...">Open...</a></li>
<li class="ui-state-disabled">Open recent...</li>
- <li><a href="#">Save</a></li>
- <li><a href="#">Save as...</a></li>
- <li><a href="#">Close</a></li>
- <li><a href="#">Quit</a></li>
+ <li><a href="#Save">Save</a></li>
+ <li><a href="#Save as...">Save as...</a></li>
+ <li><a href="#Close">Close</a></li>
+ <li><a href="#Quit">Quit</a></li>
</ul>
</li>
<li>
- <a href="#">Edit</a>
+ <a href="#Edit">Edit</a>
<ul>
- <li><a href="#">Copy</a></li>
- <li><a href="#">Cut</a></li>
+ <li><a href="#Copy">Copy</a></li>
+ <li><a href="#Cut">Cut</a></li>
<li class="ui-state-disabled">Paste</li>
</ul>
</li>
<li>
- <a href="#">View</a>
+ <a href="#View">View</a>
<ul>
- <li><a href="#">Fullscreen</a></li>
- <li><a href="#">Fit into view</a></li>
+ <li><a href="#Fullscreen">Fullscreen</a></li>
+ <li><a href="#Fit into view">Fit into view</a></li>
<li>
- <a href="#">Encoding</a>
+ <a href="#Encoding">Encoding</a>
<ul>
- <li><a href="#">Auto-detect</a></li>
- <li><a href="#">UTF-8</a></li>
+ <li><a href="#Auto-detect">Auto-detect</a></li>
+ <li><a href="#UTF-8">UTF-8</a></li>
<li>
- <a href="#">UTF-16</a>
+ <a href="#UTF-16">UTF-16</a>
<ul>
- <li><a href="#">Option 1</a></li>
- <li><a href="#">Option 2</a></li>
- <li><a href="#">Option 3</a></li>
- <li><a href="#">Option 4</a></li>
+ <li><a href="#Option 1">Option 1</a></li>
+ <li><a href="#Option 2">Option 2</a></li>
+ <li><a href="#Option 3">Option 3</a></li>
+ <li><a href="#Option 4">Option 4</a></li>
</ul>
</li>
</ul>
</li>
- <li><a href="#">Customize...</a></li>
+ <li><a href="#Customize...">Customize...</a></li>
</ul>
</li>
</ul>
<ul id="bar2" class="menubar-icons">
<li>
- <a href="#">File</a>
+ <a href="#File">File</a>
<ul>
- <li><a href="#">Open...</a></li>
+ <li><a href="#Open...">Open...</a></li>
<li class="ui-state-disabled">Open recent...</li>
- <li><a href="#">Save</a></li>
- <li><a href="#">Save as...</a></li>
- <li><a href="#">Close</a></li>
- <li><a href="#">Quit</a></li>
+ <li><a href="#Save">Save</a></li>
+ <li><a href="#Save as...">Save as...</a></li>
+ <li><a href="#Close">Close</a></li>
+ <li><a href="#Quit">Quit</a></li>
</ul>
</li>
<li>
- <a href="#">Edit</a>
+ <a href="#Edit">Edit</a>
<ul>
- <li><a href="#">Copy</a></li>
- <li><a href="#">Cut</a></li>
+ <li><a href="#Copy">Copy</a></li>
+ <li><a href="#Cut">Cut</a></li>
<li class="ui-state-disabled">Paste</li>
</ul>
</li>
<li>
- <a href="#">View</a>
+ <a href="#View">View</a>
<ul>
- <li><a href="#">Fullscreen</a></li>
- <li><a href="#">Fit into view</a></li>
+ <li><a href="#Fullscreen">Fullscreen</a></li>
+ <li><a href="#Fit into view">Fit into view</a></li>
<li>
- <a href="#">Encoding</a>
+ <a href="#Encoding">Encoding</a>
<ul>
- <li><a href="#">Auto-detect</a></li>
- <li><a href="#">UTF-8</a></li>
+ <li><a href="#Auto-detect">Auto-detect</a></li>
+ <li><a href="#UTF-8">UTF-8</a></li>
<li>
- <a href="#">UTF-16</a>
+ <a href="#UTF-16">UTF-16</a>
<ul>
- <li><a href="#">Option 1</a></li>
- <li><a href="#">Option 2</a></li>
- <li><a href="#">Option 3</a></li>
- <li><a href="#">Option 4</a></li>
+ <li><a href="#Option 1">Option 1</a></li>
+ <li><a href="#Option 2">Option 2</a></li>
+ <li><a href="#Option 3">Option 3</a></li>
+ <li><a href="#Option 4">Option 4</a></li>
</ul>
</li>
</ul>
</li>
- <li><a href="#">Customize...</a></li>
+ <li><a href="#Customize...">Customize...</a></li>
</ul>
</li>
</ul>
@@ -178,19 +178,19 @@
<td class="ui-widget-content">
<ul class="menubar">
<li>
- <a href="#">Options</a>
+ <a href="#Options">Options</a>
<ul>
- <li><a href="#">Order...</a></li>
+ <li><a href="#Order...">Order...</a></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>
- <a href="#">Rate</a>
+ <a href="#Rate">Rate</a>
<ul>
- <li><a href="#">5 stars</a></li>
- <li><a href="#">4 stars</a></li>
- <li><a href="#">3 stars</a></li>
- <li><a href="#">2 stars</a></li>
- <li><a href="#">1 stars</a></li>
+ <li><a href="#5 stars">5 stars</a></li>
+ <li><a href="#4 stars">4 stars</a></li>
+ <li><a href="#3 stars">3 stars</a></li>
+ <li><a href="#2 stars">2 stars</a></li>
+ <li><a href="#1 stars">1 stars</a></li>
</ul>
</li>
</ul>
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js
index 0841018af..5fcb0ac90 100644
--- a/ui/jquery.ui.menu.js
+++ b/ui/jquery.ui.menu.js
@@ -45,8 +45,6 @@ $.widget("ui.menu", {
if ( !item.length ) {
return;
}
- // temporary
- event.preventDefault();
// it's possible to click an item without hovering it (#7085)
if ( !self.active || ( self.active[ 0 ] !== item[ 0 ] ) ) {
self.focus( event, item );