[0005178] Fixed customer selection via popup after missing inline customer search.
[fa-stable.git] / includes / ui / ui_view.inc
index 59fa6888b0f256c6ff63f2cc8dd59d588c643f49..99a753d5ef5623cf808f21eaf904373b9c7d1b9f 100644 (file)
@@ -939,6 +939,7 @@ function get_js_select_combo_item() {
 function get_js_set_combo_item() {
        $js = "function setComboItem(doc, client_id, value, text){
        var element = doc.getElementById(client_id);
+       var search = doc.getElementById('_'+client_id+'_edit');
                if(typeof(element) != 'undefined' && element != null && element.tagName === 'SELECT') {
                        var options = element.options;
                        options.length = 0;
@@ -947,6 +948,7 @@ function get_js_set_combo_item() {
                        option.text = text;
                        element.add(option, 0);
                        element.selectedIndex = 0;
+                       search.value = '';
                element.onchange();
            } else {
                        var stock_element = doc.getElementsByName('stock_id');