Skip to content

Commit

Permalink
Merge pull request Expensify#52021 from teneeto/fix/50818/attachment-…
Browse files Browse the repository at this point in the history
…modal-position

fix: attachment menu position
  • Loading branch information
thienlnam authored Nov 18, 2024
2 parents 8e1b0fd + 52985d0 commit 4829ac9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/hooks/useWindowDimensions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,8 @@ export default function (useCachedViewportHeight = false): WindowDimensions {
return windowDimensions;
}

const didScreenReturnToOriginalSize = lockedWindowDimensionsRef.current.windowWidth === windowWidth && lockedWindowDimensionsRef.current.windowHeight === windowHeight;

// if video exits fullscreen mode, unlock the window dimensions
if (lockedWindowDimensionsRef.current && !isFullScreenRef.current && didScreenReturnToOriginalSize) {
if (lockedWindowDimensionsRef.current && !isFullScreenRef.current) {
const lastLockedWindowDimensions = {...lockedWindowDimensionsRef.current};
unlockWindowDimensions();
return {windowWidth: lastLockedWindowDimensions.windowWidth, windowHeight: lastLockedWindowDimensions.windowHeight};
Expand Down
3 changes: 1 addition & 2 deletions src/pages/home/report/ContextMenu/ReportActionContextMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ function hideContextMenu(shouldDelay?: boolean, onHideCallback = () => {}) {
return;
}
if (!shouldDelay) {
contextMenuRef.current.hideContextMenu(onHideCallback);

onHideCallback();
return;
}

Expand Down

0 comments on commit 4829ac9

Please sign in to comment.