-
Notifications
You must be signed in to change notification settings - Fork 45
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(base-modal): Скролл вверх модалки #224
Conversation
Собрана новая демка. |
Собрана новая демка. |
Pull Request Test Coverage Report for Build 3039600722
💛 - Coveralls |
Собрана новая демка. |
Можешь прикрепить код, чтобы можно было увидеть все проблемы? |
Есть песочницы было / стало. И там z-index. А нам нужен tab-index. Я думаю может пропс сделать focusableWrapper какой-нить или tabIndex И по дефолту оставить -1 |
сорри, перепутал, не проснулся еще :( |
Собрана новая демка. |
Собрана новая демка. |
# [31.3.0](v31.2.0...v31.3.0) (2022-09-13) ### Bug Fixes * **base-modal:** fixed scroll to top issues ([#224](#224)) ([2e3fdd2](2e3fdd2)) * **base-modal:** fixed ssr error in element matches polyfill ([#257](#257)) ([a6e05b1](a6e05b1)) * **file-upload-item:** fixed error display by default ([#252](#252)) ([874a669](874a669)) ### Features * **code-input:** update mobile version ([#230](#230)) ([bf66e85](bf66e85)) * **confirmation-v1:** rename package confirmation-v-1 ([#258](#258)) ([195f7a0](195f7a0)) * **confirmation-v1:** return old confirmation ([#241](#241)) ([a8779ed](a8779ed)) * **form-control, themes:** change colors in intranet theme ([#236](#236)) ([eae8b7d](eae8b7d)) * **plate:** added custom variable for box-shadow ([#256](#256)) ([4d75e4e](4d75e4e)) * **tabs:** update click theme ([#225](#225)) ([fe12ef6](fe12ef6))
🎉 This PR is included in version 31.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Опишите проблему
При открытии нескольких модалок. Если вызывающий следующую модалку контрол не мог принять фокус обратно, скролл проскакивал к первому фокусироемому элементу модалки. (В нашем случае обычно это крестик)
tabIndex для обертки позволяет фокусироваться на ней, при этом скролл сохраняет положение
При этом focus-lock рекомендуют управлять фокус локом самостоятельно, чтобы не было конфликтов при открытии нескольких модалок. Возможно стоит описать в доках, что в избежании багов фокус лок необходимо оставлять включенным только на верхней модалке