ic-ui-kit icon indicating copy to clipboard operation
ic-ui-kit copied to clipboard

[ic-search-bar] props not working as expected

Open GCHQ-Developer-530 opened this issue 1 year ago • 2 comments

Summary of the bug

When checking search bar against the PR checklist, I noticed that spell check and auto focus didn't work as expected.

🪜 How to reproduce

Tell us the steps to reproduce the problem:

  1. On the search bar playground turn on spellcheck
  2. Try typing something wrong - see that there are no red lines
  3. Turn on autofocus
  4. See that focus isn't given to the component

📸 Screenshots or code

Example of the html input with spell check Screenshot 2024-05-23 at 14 52 30

Search bar with spell check Screenshot 2024-05-23 at 14 52 35

🧐 Expected behaviour

The props should work where red lines appear for spell check and the component is focused on page load for autofocus.

Additional info

We have a focusOnLoad prop that works correctly and focuses the component on load, but autofocus doesn't work (do we just need to do the same thing for both of these props?)

GCHQ-Developer-530 avatar May 23 '24 13:05 GCHQ-Developer-530

Is spell check on Text field working too?

MI6-255 avatar Jul 11 '24 08:07 MI6-255

Is this a quirk of Storybook or the specific browser, explore if this is the case in this ticket. Instead, check this behaviour on a form

MI6-255 avatar Jul 11 '24 08:07 MI6-255

Works in stackblitz, not in Storybook

MI6-255 avatar Oct 18 '24 08:10 MI6-255

We've got a Cypress test for spellcheck, but not autofocus

MI6-255 avatar Oct 18 '24 08:10 MI6-255

spell check works. would not expect autofocus to work in storybook as it is only applied on page load. closing

ad9242 avatar Nov 21 '24 12:11 ad9242