I've got a textbox. When the user focuses the textbox I bring up a helper to help them fill it in. When the textbox is blurred the helper disappears.
The problem is that the helper now needs to include a combobox (it's a plain select
tag). Previously in order to allow the user to interact with the helper without losing focus, we used preventDefault() on mousedown events. However, it seems that the combobox's opening handler is a default event on a mousedown. So if we preventDefault, the combobox ignores the user's clicks. If we don't preventDefault, the combobox opens for a nanosecond and then the field loses focus, at which point the helper disappears, including the combobox you just opened.
How can I stop the field from losing focus but still allow the user to interact with the combobox?
Edit: I'd really rather avoid the input from losing focus. The helper's other functions don't really make sense when the input is not focused. I considered simply showing the helper after you click on the combobox even if the input is not focused but decided that I don't want to do this.