fix: sidebar swipe when target is slider
This commit is contained in:
parent
5edabd15df
commit
28ae102c02
@ -77,6 +77,10 @@ export const HeaderSidebar = ({ children }: HeaderSidebarProps) => {
|
|||||||
onSwipeStart: e => {
|
onSwipeStart: e => {
|
||||||
if (e.dir === 'Down' || e.dir === 'Up') return;
|
if (e.dir === 'Down' || e.dir === 'Up') return;
|
||||||
|
|
||||||
|
const data = (e.event.target as HTMLElement)?.dataset;
|
||||||
|
if (data?.slot === 'thumb' || data?.dragging)
|
||||||
|
return;
|
||||||
|
|
||||||
const allMenusClosed = !isMenuOpen && !isNotificationsOpen;
|
const allMenusClosed = !isMenuOpen && !isNotificationsOpen;
|
||||||
const xPercent = e.initial[0] / window.innerWidth;
|
const xPercent = e.initial[0] / window.innerWidth;
|
||||||
|
|
||||||
@ -427,7 +431,7 @@ export const HeaderSidebar = ({ children }: HeaderSidebarProps) => {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>);
|
</div>);
|
||||||
}, [isNotificationsOpen, notificationsTranslate, user, friendRequests]);
|
}, [isNotificationsOpen, notificationsTranslate, user, friendRequests, notifications, router]);
|
||||||
|
|
||||||
return (<>
|
return (<>
|
||||||
{ leftSidebar }
|
{ leftSidebar }
|
||||||
|
Loading…
Reference in New Issue
Block a user