Skip to content

Commit

Permalink
Merge pull request #53680 from bernhardoj/fix/53140-can't-press-pay-b…
Browse files Browse the repository at this point in the history
…utton-while-keyboard-is-shown

Fix can't press pay button if edit composer is focused
  • Loading branch information
Beamanator authored Dec 10, 2024
2 parents f481d64 + 3774319 commit c8e8517
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/libs/setShouldShowComposeInputKeyboardAware/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import * as Composer from '@userActions/Composer';
import type SetShouldShowComposeInputKeyboardAware from './types';

const setShouldShowComposeInputKeyboardAware: SetShouldShowComposeInputKeyboardAware = (shouldShow) => {
Composer.setShouldShowComposeInput(shouldShow);
// We want to show the main composer when the edit composer loses focus.
// If it loses focus due to a pressable being pressed, the press event might not be captured.
// To address this, we delay showing the main composer to allow the press event to be completed.
setTimeout(() => {
Composer.setShouldShowComposeInput(shouldShow);
}, 0);
};

export default setShouldShowComposeInputKeyboardAware;

0 comments on commit c8e8517

Please sign in to comment.