fix(component): prevent auto focus in mobile modal (#9247)

Continue [BS-2169](https://linear.app/affine-design/issue/BS-2169/新的-menu-不支持移动端)
This commit is contained in:
L-Sun
2024-12-23 09:56:58 +00:00
parent ba355d098d
commit 067469aa98
3 changed files with 17 additions and 6 deletions

View File

@@ -46,18 +46,18 @@ export const focusInteractive = style([
basicInteractive,
{
selectors: {
':not([data-mobile="true"]) &::before': {
'&::before': {
opacity: 0,
boxShadow: `0 0 0 2px ${cssVar('brandColor')}`,
},
':not([data-mobile="true"]) &::after': {
'&::after': {
border: '1px solid transparent',
},
':not([data-mobile="true"]) &:focus-visible::before': {
'&:focus-visible::before': {
opacity: 0.5,
},
':not([data-mobile="true"]) &:focus-visible::after': {
'&:focus-visible::after': {
borderColor: cssVar('brandColor'),
},
},