Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(search): change conditions for showing trailing button #10973

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

Antreesy
Copy link
Contributor

@Antreesy Antreesy commented Nov 22, 2023

☑️ Resolves

when focusing the search box, we're facing a loop for mobiles / desktops with small screen resolution:

  • Tabbing from input moves the focus to the trailing button
  • At the nextTick, trailing button will be deleted, as system assumes search field to be blurred
  • No element to focus => focus-trap falls back to the first available element => input field again

Workaround from Marco: setting a negative tabindex on the trailing button unless there is a non-empty value

🖌️ UI Checklist

🖼️ Screenshots / Screencasts

🏚️ Before

loop.mp4

🏡 After

not-loop.mp4

🏁 Checklist

Copy link
Member

@marcoambrosini marcoambrosini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Antreesy Antreesy marked this pull request as ready for review November 23, 2023 08:44
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy
Copy link
Contributor Author

/backport to stable28

@Antreesy Antreesy merged commit 4388fdf into main Nov 27, 2023
35 checks passed
@Antreesy Antreesy deleted the fix/10908/hide-trailing-button branch November 27, 2023 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants