-
Notifications
You must be signed in to change notification settings - Fork 131
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
[Modal] убрать отображение фокуса на крестике при клике мышью #2565
Conversation
&:focus { | ||
outline: 2px solid ${t.borderColorFocus}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Чуть выше надо ещё удалить селектор &:focus,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
селектор удалила, но в класс focus из него перенесла свойство color, тк при фокусе цвет должен меняться
const [focusedByTab, setFocusedByTab] = React.useState(false); | ||
|
||
const handleFocus = () => { | ||
if (!disableClose) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Сейчас кнопка внешне не меняется, по факту попадает в фокус. Это уже другая ошибка, т.к. подобное поведение есть и сейчас, но давай поправим =)
Надо вместо этого условия добавить проп tabIndex={disableClose ? -1 : 0}
в саму кнопку. Тогда она даже не будет попадать в фокус, соответственно не будет дергать событие onFocus
.
fix #2549
Реализовала через keyListener, как в остальных контролах.