mi6 / ic-ui-kit

Intelligence Community UI Kit (based on StencilJS)
MIT License
25 stars 25 forks source link

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

Open GCHQ-Developer-530 opened 4 months ago

GCHQ-Developer-530 commented 4 months ago

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?)

MI6-255 commented 3 months ago

Is spell check on Text field working too?

MI6-255 commented 3 months ago

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 commented 1 day ago

Works in stackblitz, not in Storybook

MI6-255 commented 1 day ago

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