Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1145
Handling the Tab key
posted

We have barcode scanners that we're using to scan an item from a combo box. What we do is, in the KeyDown event, we check for a tab key (or enter key, as some scanners use that) and then we check to see if the text in the combo matches an item. If it does, then what we want to do is clear out the combo's textbox, close the dropdown, and keep the focus inside the combo.

Specifically, what I'm doing at the end of my code is: 

    warehouseItemCombo.igCombo('text', '', false);
    warehouseItemCombo.igCombo('setFocus');
    e.stopImmediatePropagation();
    e.preventDefault();

 The problem is, my combo remains open (dropped down) with the item that matches the scanned barcode in the textbox, and I can't really figure out where the focus is, but it doesn't appear to be in teh combo.

How can I make this work the way I want? Incidentally, this all works fine with just the enter key. It's with the tab key that the behavior is problematic.

 

Parents Reply Children
No Data