From 0dbcbbc8460dd570cffa408d7e876a88576cda79 Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Sun, 6 Nov 2011 18:22:36 +0100 Subject: [PATCH] some code cleanup --- demos/selectmenu/typeahead.html | 138 +++++++++++++++++--------------- ui/jquery.ui.selectmenu.js | 8 +- 2 files changed, 79 insertions(+), 67 deletions(-) diff --git a/demos/selectmenu/typeahead.html b/demos/selectmenu/typeahead.html index c3424aa54..79a46890f 100644 --- a/demos/selectmenu/typeahead.html +++ b/demos/selectmenu/typeahead.html @@ -25,7 +25,19 @@ @@ -34,68 +46,68 @@
- +
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index b53f577ab..91e1c3841 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -303,8 +303,8 @@ $.widget("ui.selectmenu", { } var thisAAttr = { html: selectOptionData[i].text, - href : '#nogo', - tabindex : -1, + href : '#nogo', + tabindex : -1, role : 'option', 'aria-selected' : false }; @@ -434,7 +434,7 @@ $.widget("ui.selectmenu", { if ( this.element.attr( 'disabled' ) ) { this.disable(); } else { - this.enable() + this.enable(); } // update value @@ -504,7 +504,7 @@ $.widget("ui.selectmenu", { // selected index, if it's in the menu, just the focused one // I copied this code from _moveSelection() and _moveFocus() // respectively --thg2k - var selectedIndex = (eventType !== 'focus' ? + var selectedIndex = (eventType !== 'focus' ? this._selectedOptionLi().data('index') : this._focusedOptionLi().data('index')) || 0; -- 2.39.5