box-ui-elements icon indicating copy to clipboard operation
box-ui-elements copied to clipboard

SearchForm search button is not interactive

Open rlyonbox opened this issue 2 years ago • 1 comments

Reported by Boxer, created on their behalf: "Nothing happens when clicking on the magnifying glass in the [ContextExplorerModal]"

Digging into the code a little, this resolves to the type attribute on the button which renders the magnifying glass being button instead of submit on this line: https://github.com/box/box-ui-elements/blob/ef674ae9124b74126ae11b729e074cf8658c15a5/src/components/search-form/SearchForm.js#L168

Resolution is trivial, 1 line change, but I'm not sure the provenance of using type=button in the first place.

rlyonbox avatar Aug 08 '22 10:08 rlyonbox

Agree with changing the <button/> type to a submit. The unit test needs to be updated to simulate clicking on the button and not invoking the submit event directly https://github.com/box/box-ui-elements/blob/ef674ae9124b74126ae11b729e074cf8658c15a5/src/components/search-form/tests/SearchForm.test.js#L66

greg-in-a-box avatar Aug 10 '22 20:08 greg-in-a-box