Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: fnagel/jquery-ui
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: selectmenu_v1.4.0
Choose a base ref
...
head repository: fnagel/jquery-ui
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: selectmenu
Choose a head ref
  • 11 commits
  • 1 file changed
  • 4 contributors

Commits on Jun 12, 2013

  1. Copy the full SHA
    8cc74e5 View commit details

Commits on Oct 13, 2013

  1. set version to 1.5.0pre

    fnagel committed Oct 13, 2013
    Copy the full SHA
    1a9d0bc View commit details
  2. Merge pull request #309 from jakob-stoeck/patch-1

    fixed: plugins which wrap the selectmenu content make it non-clickable
    fnagel committed Oct 13, 2013
    Copy the full SHA
    81cd67f View commit details

Commits on Oct 25, 2013

  1. remove blank causing a jqmigrate warning

    remove blank causing a jqmigrate warning
    wuSam committed Oct 25, 2013
    Copy the full SHA
    5034d5e View commit details

Commits on Nov 7, 2013

  1. Merge pull request #319 from wuSam/patch-1

    fixed: remove blank causing a jqmigrate warning
    fnagel committed Nov 7, 2013
    Copy the full SHA
    6cbd40b View commit details
  2. Copy the full SHA
    3268978 View commit details

Commits on Dec 2, 2013

  1. Copy the full SHA
    7011574 View commit details

Commits on Jan 22, 2014

  1. Merge pull request #323 from brlewis/selectmenu

    fixed: leave height as auto for Android 2 where internal divs don't scroll
    fnagel committed Jan 22, 2014
    Copy the full SHA
    e254aca View commit details

Commits on Jun 3, 2014

  1. 1
    Copy the full SHA
    ff04ae4 View commit details
  2. Copy the full SHA
    9f9f618 View commit details

Commits on Jun 4, 2014

  1. updated: copyright year

    fnagel committed Jun 4, 2014
    Copy the full SHA
    36b6a3f View commit details
Showing with 21 additions and 16 deletions.
  1. +21 −16 ui/jquery.ui.selectmenu.js
37 changes: 21 additions & 16 deletions ui/jquery.ui.selectmenu.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* jQuery UI Selectmenu version 1.4.0
* jQuery UI Selectmenu version 1.5.0pre
*
* Copyright (c) 2009-2010 filament group, http://filamentgroup.com
* Copyright (c) 2010-2013 Felix Nagel, http://www.felixnagel.com
* Copyright (c) 2010-2014 Felix Nagel, http://www.felixnagel.com
* Licensed under the MIT (MIT-LICENSE.txt)
*
* https://github.com/fnagel/jquery-ui/wiki/Selectmenu
@@ -336,13 +336,15 @@ $.widget("ui.selectmenu", {
return false;
})
.bind('mouseover.selectmenu', function( e ) {
// no hover if diabled
// no hover if disabled
if ( !$( this ).hasClass( 'ui-state-disabled' ) && !$( this ).parent( "ul" ).parent( "li" ).hasClass( 'ui-state-disabled' ) ) {
e.optionValue = self.element[ 0 ].options[ $( this ).data( 'index' ) ].value;
self._trigger( "hover", e, self._uiHash() );
self._selectedOptionLi().addClass( activeClass );
self._focusedOptionLi().removeClass( 'ui-selectmenu-item-focus ui-state-hover' );
$( this ).removeClass( 'ui-state-active' ).addClass( 'ui-selectmenu-item-focus ui-state-hover' );
if ( self._typeAhead_timer === undefined ) {
e.optionValue = self.element[ 0 ].options[ $( this ).data( 'index' ) ].value;
self._trigger( "hover", e, self._uiHash() );
self._selectedOptionLi().addClass( activeClass );
self._focusedOptionLi().removeClass( 'ui-selectmenu-item-focus ui-state-hover' );
$( this ).removeClass( 'ui-state-active' ).addClass( 'ui-selectmenu-item-focus ui-state-hover' );
}
}
})
.bind( 'mouseout.selectmenu', function( e ) {
@@ -388,7 +390,7 @@ $.widget("ui.selectmenu", {
}
}
} else {
$(' <li role="presentation"><a href="#nogo" tabindex="-1" role="option"></a></li>' ).appendTo( this.list );
$('<li role="presentation"><a href="#nogo" tabindex="-1" role="option"></a></li>' ).appendTo( this.list );
}
// we need to set and unset the CSS classes for dropdown and popup style
var isDropDown = ( o.style == 'dropdown' );
@@ -414,13 +416,15 @@ $.widget("ui.selectmenu", {
this.list.width( o.menuWidth ? o.menuWidth : o.width - o.handleWidth );
}

// reset height to auto
this.list.css( 'height', 'auto' );
var listH = this.listWrap.height();
var winH = $( window ).height();
// calculate default max height
var maxH = o.maxHeight ? Math.min( o.maxHeight, winH ) : winH / 3;
if ( listH > maxH ) this.list.height( maxH );
// Android 2 (Gingerbread) doesn't support internal scrollable divs.
// Don't limit the menu height for that browser.
if ( !navigator.userAgent.match( /Android 2/ ) ) {
var listH = this.listWrap.height();
var winH = $( window ).height();
// calculate default max height
var maxH = o.maxHeight ? Math.min( o.maxHeight, winH ) : winH / 3;
if ( listH > maxH ) this.list.height( maxH );
}

// save reference to actionable li's (not group label li's)
this._optionLis = this.list.find( 'li:not(.ui-selectmenu-group)' );
@@ -507,6 +511,7 @@ $.widget("ui.selectmenu", {
}
} else {
nextIndex = i;
break;
}
}
}