Merge pull request #2247 from omnivore-app/fix/header-mouse-events

Dont capture cursor events when the header is transparent
This commit is contained in:
Jackson Harper 2023-05-25 11:27:37 +08:00 committed by GitHub
commit d90a0deb66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,6 +29,8 @@ export function ReaderHeader(props: ReaderHeaderProps): JSX.Element {
height: HEADER_HEIGHT,
display: props.alwaysDisplayToolbar ? 'flex' : 'transparent',
pt: '35px',
pointerEvents: 'none',
cursor: 'default',
borderBottom: props.alwaysDisplayToolbar
? '1px solid $thBorderColor'
: '1px solid transparent',
@ -36,10 +38,14 @@ export function ReaderHeader(props: ReaderHeaderProps): JSX.Element {
height: MOBILE_HEADER_HEIGHT,
pt: '0px',
bg: '$readerMargin',
pointerEvents: 'unset',
cursor: 'unset',
borderBottom: '1px solid $thBorderColor',
},
'@mdDown': {
bg: '$readerBg',
pointerEvents: 'unset',
cursor: 'unset',
},
}}
>