Fix for the cursor conflict bug in firefox
This commit is contained in:
parent
efad07011a
commit
f11da93840
1 changed files with 4 additions and 3 deletions
|
@ -18,13 +18,12 @@ const Container = styled.div`
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
const CursorOverride = styled.div<{cursor: null | string}>`
|
const CursorOverride = styled.div`
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|
||||||
#pointer-root:not(.normal) > & {
|
#pointer-root:not(.normal) > & {
|
||||||
cursor: ${(props) => props.cursor ?? 'default'};
|
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
@ -55,10 +54,12 @@ const PointerEventsHandler: React.FC<{
|
||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
console.log(locks[0]?.cursor)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<context.Provider value={contextValue}>
|
<context.Provider value={contextValue}>
|
||||||
<Container id={elementId} className={locks[0]?.className ?? 'normal'}>
|
<Container id={elementId} className={locks[0]?.className ?? 'normal'}>
|
||||||
<CursorOverride cursor={locks[0]?.cursor}>
|
<CursorOverride style={{cursor: locks[0]?.cursor ?? ''}}>
|
||||||
{props.children}
|
{props.children}
|
||||||
</CursorOverride>
|
</CursorOverride>
|
||||||
</Container>
|
</Container>
|
||||||
|
|
Loading…
Reference in a new issue