Skip to content

feat(NcPopover): auto return focus to trigger button on close#5155

Merged
susnux merged 1 commit intostable8from
fix/nc-popover--auto-return-focus
Aug 29, 2025
Merged

feat(NcPopover): auto return focus to trigger button on close#5155
susnux merged 1 commit intostable8from
fix/nc-popover--auto-return-focus

Conversation

@ShGKme
Copy link
Copy Markdown
Contributor

@ShGKme ShGKme commented Jan 27, 2024

☑️ Resolves

🖼️ Screenshots

🏚️ Before 🏡 After
B A

🚧 Tasks

  • Automatically find a button inside the NcPopover trigger and use it as fallback for setReturnFocus
  • Add noAutoReturnFocus to optionally disable this behavior
    • Useful when there is a custom focus control, like in NcActions
  • Adjust NcActions

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable

@ShGKme ShGKme added enhancement New feature or request 3. to review Waiting for reviews feature: popover Related to the popovermenu component accessibility Making sure we design for the widest range of people possible, including those who have disabilities labels Jan 27, 2024
@ShGKme ShGKme self-assigned this Jan 27, 2024
@ShGKme ShGKme added this to the 8.8.2 milestone Feb 29, 2024
@juliusknorr juliusknorr modified the milestones: 8.8.2, 8.9.1 Mar 6, 2024
@Pytal Pytal modified the milestones: 8.9.1, 8.9.2 Mar 6, 2024
@ShGKme ShGKme modified the milestones: 8.9.2, 8.10.0, 8.10.1, 8.11.0 Mar 8, 2024
@ShGKme ShGKme modified the milestones: 8.11.0, 8.11.1 Mar 15, 2024
@Antreesy Antreesy modified the milestones: 8.11.1, 8.11.2 Mar 21, 2024
@susnux susnux added this to the 8.20.0 milestone Sep 17, 2024
@Antreesy Antreesy modified the milestones: 8.20.0, 8.21.0 Nov 11, 2024
@Antreesy Antreesy modified the milestones: 8.21.0, 8.22.0 Nov 21, 2024
@hamza221 hamza221 modified the milestones: 8.22.0, 8.23.0 Dec 23, 2024
@Antreesy Antreesy modified the milestones: 8.23.0, 8.24.0 Feb 13, 2025
@ShGKme ShGKme modified the milestones: 8.24.0, 8.25.0 Apr 2, 2025
@susnux susnux force-pushed the fix/nc-popover--auto-return-focus branch from be836c0 to 1f34a6c Compare April 7, 2025 18:58
@susnux susnux requested review from skjnldsv and susnux April 7, 2025 19:02
@susnux susnux marked this pull request as ready for review April 7, 2025 19:02
Copy link
Copy Markdown
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

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

Rebased onto stable8.
Tested it and the EmojiPicker bug is resolved with this 🚀

@susnux
Copy link
Copy Markdown
Contributor

susnux commented Apr 7, 2025

/backport to main

@ShGKme
Copy link
Copy Markdown
Contributor Author

ShGKme commented Apr 7, 2025

Tested it and the EmojiPicker bug is resolved with this 🚀

I don't remember why I did it, and I'm almost sure it was fixed another way around 🙈

@susnux
Copy link
Copy Markdown
Contributor

susnux commented Apr 7, 2025

@ShGKme yes with #6655

But this solution here is more generic. Please decide yourself if you think we need this feature here or close otherwise :)

@susnux susnux removed this from the 8.25.0 milestone Apr 16, 2025
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme
Copy link
Copy Markdown
Contributor Author

ShGKme commented Aug 29, 2025

🤨

@susnux susnux mentioned this pull request Sep 1, 2025
3 tasks
@ShGKme
Copy link
Copy Markdown
Contributor Author

ShGKme commented Sep 3, 2025

@Antreesy @susnux Did you approve/merge it to fix some specific bug?

@ShGKme
Copy link
Copy Markdown
Contributor Author

ShGKme commented Sep 3, 2025

Or @AndyScherzinger as you pushed something

@Antreesy
Copy link
Copy Markdown
Contributor

Antreesy commented Sep 3, 2025

I didn't check the dates, thought it's just rebased

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews accessibility Making sure we design for the widest range of people possible, including those who have disabilities enhancement New feature or request feature: popover Related to the popovermenu component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NcEmojiPicker] is losing focus after close

6 participants