diff --git a/jquery/js/jquery.combobox.js b/jquery/js/jquery.combobox.js index 8aaec45..d1391da 100644 --- a/jquery/js/jquery.combobox.js +++ b/jquery/js/jquery.combobox.js @@ -45,11 +45,15 @@ var thisSelector = this.selector; var thisCombobox = this; showSelectorButton.click(function (e) { - jQuery('html').trigger('click'); - thisSelector.buildSelectOptionList(); - thisSelector.show(); - thisCombobox.focus(); - return false; + e.preventDefault(); + e.stopPropagation(); + + if(thisCombobox.isDisabled() === false) { + jQuery('html').trigger('click'); + thisSelector.buildSelectOptionList(); + thisSelector.show(); + thisCombobox.focus(); + } }); this.bindKeypress(); }; @@ -98,8 +102,11 @@ focus : function () { this.textInputElement.trigger('focus'); + }, + + isDisabled : function() { + return this.textInputElement.prop('disabled'); } - }; Combobox.keys = {