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 focusing for popups #26826

Merged
merged 4 commits into from
Sep 12, 2023
Merged
Changes from 3 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 @@ -354,9 +354,10 @@ function ComposerWithSuggestions({
* @returns {Boolean}
*/
const checkComposerVisibility = useCallback(() => {
const isComposerCoveredUp = EmojiPickerActions.isEmojiPickerVisible() || isMenuVisible || modal.isVisible;
// Checking weather the screen is focused or not, helps avoiding `modal.isVisible` false when popups are closed even modal is opened
b4s36t4 marked this conversation as resolved.
Show resolved Hide resolved
const isComposerCoveredUp = !isFocused || EmojiPickerActions.isEmojiPickerVisible() || isMenuVisible || modal.isVisible || modal.willAlertModalBecomeVisible;
return !isComposerCoveredUp;
}, [isMenuVisible, modal.isVisible]);
}, [isMenuVisible, modal, isFocused]);

const focusComposerOnKeyPress = useCallback(
(e) => {
Expand Down
Loading