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

Element within ModalContent in new window keeps losing focus #2075

Open
3 tasks
yangwooseong opened this issue Mar 15, 2024 · 0 comments
Open
3 tasks

Element within ModalContent in new window keeps losing focus #2075

yangwooseong opened this issue Mar 15, 2024 · 0 comments
Labels
bug Issues related to anything that isn't working status:wontfix Issue that will not be worked on

Comments

@yangwooseong
Copy link
Collaborator

yangwooseong commented Mar 15, 2024

Summary

새 창에서 뜬 모달안에 있는 엘리먼트가 포커싱을 잃어버립니다.

Reproduction process

  1. 새 창에서 모달을 띄웁니다.
  2. 모달 안에 있는 input element 에 문자를 입력할 때, ModalContent 안에 있는 DOM 구조가 달라지면 input 에서 포커싱을 잃어버립니다.

문제의 원인은 Radix 에서 사용하는 focus 로직이 또 하나의 window 를 가지는 경우를 고려하지 않고 작성되어서 그렇습니다. Radix 에 의존하는 베지어 특성상 베지어에서 해결하는 것은 매우 어렵고, 어플리케이션에서 radix 의 포커싱 로직을 우회하는 것이 최선입니다. 여기에 대해 베지어에서 대응을 더 하지는 않을 예정으로 결론 내린 상태입니다.

새 윈도우를 사용하는 경우 이런 버그가 또 나올 수 있어서 앞으로 유념해야할 것 같습니다.

Version of bezier-react

2.0.0-alpha.17

Browser

No response

Operating system

  • macOS
  • Windows
  • Linux

Additonal Information

https://github.com/radix-ui/primitives/blob/82eebe9597186503e0fc1074ffba66a333cfcb63/packages/react/focus-scope/src/FocusScope.tsx#L113-L119

@yangwooseong yangwooseong added bug Issues related to anything that isn't working status:wontfix Issue that will not be worked on labels Mar 15, 2024
@github-project-automation github-project-automation bot moved this to 📌 Backlog in Bezier React Mar 15, 2024
@yangwooseong yangwooseong moved this from 📌 Backlog to 🧊 Pending in Bezier React Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues related to anything that isn't working status:wontfix Issue that will not be worked on
Projects
No open projects
Status: 🧊 Pending
Development

No branches or pull requests

1 participant