Ignore:
Timestamp:
Jun 24, 2014, 10:16:59 PM (10 years ago)
Author:
rvelices
Message:

upgrade jquery ui from 1.10.1 to 1.10.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/default/js/ui/jquery.ui.menu.js

    r20824 r28780  
    11/*!
    2  * jQuery UI Menu 1.10.1
     2 * jQuery UI Menu 1.10.4
    33 * http://jqueryui.com
    44 *
    5  * Copyright 2013 jQuery Foundation and other contributors
     5 * Copyright 2014 jQuery Foundation and other contributors
    66 * Released under the MIT license.
    77 * http://jquery.org/license
     
    1717
    1818$.widget( "ui.menu", {
    19         version: "1.10.1",
     19        version: "1.10.4",
    2020        defaultElement: "<ul>",
    2121        delay: 300,
     
    7676                                var target = $( event.target ).closest( ".ui-menu-item" );
    7777                                if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
    78                                         this.mouseHandled = true;
    79 
    8078                                        this.select( event );
     79
     80                                        // Only set the mouseHandled flag if the event will bubble, see #9469.
     81                                        if ( !event.isPropagationStopped() ) {
     82                                                this.mouseHandled = true;
     83                                        }
     84
    8185                                        // Open submenu on click
    8286                                        if ( target.has( ".ui-menu" ).length ) {
    8387                                                this.expand( event );
    84                                         } else if ( !this.element.is( ":focus" ) ) {
     88                                        } else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) {
     89
    8590                                                // Redirect focus to the menu
    8691                                                this.element.trigger( "focus", [ true ] );
     
    175180
    176181        _keydown: function( event ) {
    177                 /*jshint maxcomplexity:20*/
    178182                var match, prev, character, skip, regex,
    179183                        preventDefault = true;
     
    283287                        icon = this.options.icons.submenu,
    284288                        submenus = this.element.find( this.options.menus );
     289
     290                this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length );
    285291
    286292                // Initialize nested menus
     
    384390
    385391                nested = item.children( ".ui-menu" );
    386                 if ( nested.length && ( /^mouse/.test( event.type ) ) ) {
     392                if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
    387393                        this._startOpening(nested);
    388394                }
Note: See TracChangeset for help on using the changeset viewer.