mirror of
https://github.com/outline/outline.git
synced 2026-11-30 17:10:36 +03:00
fix: Tapping a sidebar icon on touch devices opens the document instead of expanding it (#14029)
This commit is contained in:
1 parent
957a91129b
commit
019be197a7
1 file changed
+4
-5
@@ -269,12 +269,12 @@ const Content = styled.span`
|
||||
min-width: 0;
|
||||
`;
|
||||
|
||||
// Stays over the icon while invisible so that a tap on the icon toggles, even
|
||||
// on touch devices where there is no hover to reveal it first.
|
||||
const HiddenDisclosure = styled(Disclosure)`
|
||||
position: inherit;
|
||||
inset-inline-start: initial;
|
||||
display: none;
|
||||
opacity: 0;
|
||||
margin-inline-start: -2px;
|
||||
margin-inline-end: 6px;
|
||||
`;
|
||||
|
||||
const Link = styled(NavLink)<{
|
||||
@@ -339,12 +339,11 @@ const Link = styled(NavLink)<{
|
||||
&: ${hover},
|
||||
&:has([data-state="open"]) {
|
||||
${HiddenDisclosure} {
|
||||
display: block;
|
||||
opacity: 1;
|
||||
}
|
||||
${HiddenDisclosure} + ${IconWrapper} {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user