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

Remove nz-drawer focus #8839

Open
vatsake opened this issue Oct 18, 2024 · 1 comment
Open

Remove nz-drawer focus #8839

vatsake opened this issue Oct 18, 2024 · 1 comment
Assignees
Labels
Component: Drawer 👨‍🏭 Some one working on this A community member has started working on this

Comments

@vatsake
Copy link

vatsake commented Oct 18, 2024

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-ivy-eqsoqx?file=src%2Fapp%2Fapp.component.ts

Steps to reproduce

  1. Click the first button
  2. Close the drawer
  3. Click the second button
  4. Close the drawer

The first button will be focused

What is expected?

The previous button is focused or nothing is focused at all.

What is actually happening?

nz-drawer components saves the first focused element.
So it will focus that one after drawer close.

Environment Info
ng-zorro-antd 18.1.1
Browser Chrome

It might not look like a big issue, but in my form, the buttons are far apart.
After closing the drawer, the element will be focused and the window will be scrolled to that element.

Maybe add option to focus or not?

@ParsaArvanehPA
Copy link
Contributor

Hi @vatsake ,
Thank you for reporting this issue,
a fix is on it's way 👍

@Laffery Laffery added the 👨‍🏭 Some one working on this A community member has started working on this label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Drawer 👨‍🏭 Some one working on this A community member has started working on this
Projects
None yet
Development

No branches or pull requests

4 participants