]> source.dussan.org Git - jquery-ui.git/commitdiff
Menu: Add ui-front on submenus to address opacity messing up stacking order. Fixes... 1147/head
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Tue, 3 Dec 2013 11:50:25 +0000 (12:50 +0100)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Tue, 3 Dec 2013 16:03:01 +0000 (17:03 +0100)
tests/visual/menu/menu.html
ui/jquery.ui.menu.js

index 1c203ef12af79f276e788b2cd11752878e76e9da..4e322130ad5e2c1db61a3f9daa008c3048289655 100644 (file)
                        $( "<p>" ).text( "Selected: " + ui.item.text() ).appendTo( "#log" );
                }
 
-               $( "#menu1, #menu2, #menu3, .menu4" ).menu({
+               $( "#menu1, #menu3, .menu4" ).menu({
+                       select: logger
+               });
+
+               $( "#menu2" ).menu({
+                       position: {
+                               my: "left top",
+                               at: "left+10 top-20"
+                       },
                        select: logger
                });
 
@@ -39,6 +47,7 @@
        <style>
                body { font-size:62.5%; }
                .ui-menu { width: 200px; margin-bottom: 2em; }
+               .menu2-container { width: 220px; }
                .menu4 { height: 200px; overflow-y: auto; overflow-x: hidden; }
                .address-item { border-bottom: 1px solid #999; }
                .address-header { display: block; margin-bottom: .2em; font-weight: bold; }
@@ -88,7 +97,7 @@
                                        <li>Salzburg</li>
                                </ul>
                        </li>
-                       <li>Perch</li>
+                       <li class="ui-state-disabled">Perch</li>
                </ul>
        </li>
        <li class="ui-state-disabled">Amesville</li>
index c5d2bc7775345137d7a40c680a2188b65870d47f..86ef4577e4ed2ef3bc437c2544628806a31fac68 100644 (file)
@@ -147,7 +147,7 @@ $.widget( "ui.menu", {
                this.element
                        .removeAttr( "aria-activedescendant" )
                        .find( ".ui-menu" ).addBack()
-                               .removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons" )
+                               .removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" )
                                .removeAttr( "role" )
                                .removeAttr( "tabIndex" )
                                .removeAttr( "aria-labelledby" )
@@ -292,7 +292,7 @@ $.widget( "ui.menu", {
 
                // Initialize nested menus
                submenus.filter( ":not(.ui-menu)" )
-                       .addClass( "ui-menu ui-widget ui-widget-content" )
+                       .addClass( "ui-menu ui-widget ui-widget-content ui-front" )
                        .hide()
                        .attr({
                                role: this.options.role,