nostrademons/jquery-combobox — Issue #2: Patch: scroll to show current value
Author: mihmax
Created: 2011-12-07 13:17:50+00:00
State: open

Here's the patch

```patch
Index: web-app/js/jquery.combobox/ui.combobox.js
===================================================================
--- web-app/js/jquery.combobox/ui.combobox.js	(date 1323263480000)
+++ web-app/js/jquery.combobox/ui.combobox.js	(revision )
@@ -268,6 +268,10 @@
$('.ui-combobox-list').hide();
this.listElem.css(styles).show();
this.changeSelection(this.findSelection(), e);
+ // #2 scroll to show current value
+ if (this.listElem.children('.selected').length > 0) {
+ this.listElem.children('.selected')[0].scrollIntoView();
+ }
},

/**

```