Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix composer educational tooltip wrong position on mWeb Safari #54344

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useThemeStyles from '@hooks/useThemeStyles';
import useViewportOffsetTop from '@hooks/useViewportOffsetTop';
import canFocusInputOnScreenFocus from '@libs/canFocusInputOnScreenFocus';
import * as DeviceCapabilities from '@libs/DeviceCapabilities';
import DomUtils from '@libs/DomUtils';
Expand Down Expand Up @@ -130,6 +131,7 @@ function ReportActionCompose({
const {translate} = useLocalize();
// eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
const {isSmallScreenWidth, isMediumScreenWidth, shouldUseNarrowLayout} = useResponsiveLayout();
const offsetTop = useViewportOffsetTop();
const {isOffline} = useNetwork();
const actionButtonRef = useRef<View | HTMLDivElement | null>(null);
const currentUserPersonalDetails = useCurrentUserPersonalDetails();
Expand Down Expand Up @@ -459,7 +461,7 @@ function ReportActionCompose({
}}
wrapperStyle={styles.reportActionComposeTooltipWrapper}
shiftHorizontal={variables.composerTooltipShiftHorizontal}
shiftVertical={variables.composerTooltipShiftVertical}
shiftVertical={variables.composerTooltipShiftVertical + offsetTop}
>
<View
ref={containerRef}
Expand Down
Loading