programmable-matter icon indicating copy to clipboard operation
programmable-matter copied to clipboard

cmd-L to focus search box doesn't re-select current search if box already focused

Open jaked opened this issue 3 years ago • 0 comments

cmd-L focuses the search box and selects its contents; but if the box is already focused, the contents are not re-selected.

This is due to the goofy (?) setup of focus as a piece of React state; we hook the change in state to select the contents, but if the state hasn't changed the hook doesn't run. Seems like we need an action in addition (instead of?) the state change.

jaked avatar Nov 15 '21 20:11 jaked