summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2011-04-17 23:09:24 +0200
committerFelix Nagel <info@felixnagel.com>2011-04-17 23:09:24 +0200
commit6ff94ff18ba7bc8d87579fab2a671991f497f1ff (patch)
tree6e9ea3e0c7f251993329926235597c36557cd59b
parent63c72c2bfd5c08539bc5590beac80153fa2ec1db (diff)
downloadjquery-ui-6ff94ff18ba7bc8d87579fab2a671991f497f1ff.tar.gz
jquery-ui-6ff94ff18ba7bc8d87579fab2a671991f497f1ff.zip
fixed: follow-up fix for disabling / enabling functionality, thx to gcko fro reporting, see https://github.com/fnagel/jquery-ui/issues/105
fixed: small issue in disable_enable.html demo file
-rw-r--r--demos/selectmenu/disable_enable.html2
-rw-r--r--ui/jquery.ui.selectmenu.js12
2 files changed, 7 insertions, 7 deletions
diff --git a/demos/selectmenu/disable_enable.html b/demos/selectmenu/disable_enable.html
index f54d47870..ac49e9e3b 100644
--- a/demos/selectmenu/disable_enable.html
+++ b/demos/selectmenu/disable_enable.html
@@ -57,7 +57,7 @@
var speedB2 = $('select#speedB2').selectmenu();
$("#optionSwitch").toggle(
function(){
- speedB2.selectmenu("disable", 0);
+ speedB2.selectmenu("disable", 2);
},
function(){
speedB2.selectmenu("enable", 2);
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js
index a5992b1a4..1efa6b630 100644
--- a/ui/jquery.ui.selectmenu.js
+++ b/ui/jquery.ui.selectmenu.js
@@ -453,9 +453,9 @@ $.widget("ui.selectmenu", {
});
// if we didnt find it clear the prevChar
- if (!focusFound) {
+ // if (!focusFound) {
//self._prevChar = undefined
- }
+ // }
// set a 1 second timeout for sequenctial typeahead
// keep this set even if we have no matches so it doesnt typeahead somewhere else
@@ -639,8 +639,8 @@ $.widget("ui.selectmenu", {
},
disable: function(index, type){
- //if options is not provided, call the parents disable function
- if ( index === null ) {
+ // if options is not provided, call the parents disable function
+ if ( typeof( index ) == 'undefined' ) {
this._setOption( 'disabled', true );
} else {
if ( type == "optgroup" ) {
@@ -652,8 +652,8 @@ $.widget("ui.selectmenu", {
},
enable: function(index, type) {
- //if options is not provided, call the parents enable function
- if ( !index ) {
+ // if options is not provided, call the parents enable function
+ if ( typeof( index ) == 'undefined' ) {
this._setOption('disabled', false);
} else {
if ( type == "optgroup" ) {