Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prevent single-select lists from reopening when you select an it…
…em from the search bar We have this very specific edge case in the new project form dropdowns. It only occurs for the single-select lists and only if you select an item via search. When the search input is non-empty, you can use enter to select the first item in the list. For some reason, this also triggers a click on the underlying button that opens the dropdown (I'm guessing this is to do with an underlying focus). To work around it, we create a variable that prevents you from opening the dropdown if it is true. We set it to 'true' when you close it (for single-selects), but also set single-millisecond timeout that sets it to false thereafter. This is much to short for the user to notice anything, but it prevents the browser from noticing the click.
- Loading branch information