fix(room join): multiple button click disabled while submitting room join form#17007
fix(room join): multiple button click disabled while submitting room join form#17007bandhan-majumder wants to merge 1 commit intojitsi:masterfrom
Conversation
|
Hi, thanks for your contribution! |
|
@damencho can you please review this PR? 🙏 |
| insecureRoomName: boolean; | ||
| isSettingsScreenFocused?: boolean; | ||
| isSubmitted?: boolean; | ||
| joining: boolean; |
There was a problem hiding this comment.
I wanted to reuse the joining prop for this disable button check but however, this does not work correctly. After trying to join, the function dispatches joining to false asynchronously. So, buttons are not disabled and still clickable. So I introduced a new isSubmitted prop. This works correctly as we set it immediately after the user clicks it. This works correctly now.
|
In react-native though, we change the whole button component based on joining, so I have not added the change there as I assume that does not make sense as we change the whole button completely. If we still want this on native, we may need to hardcode this to one of the two components which I think we really want to avoid. Please let me know what you think |
|
@damencho @jallamsetty1 can you please take a look at this fix |
What does it do?
Fixes multiple submission of a form while joining a single room. It adds a state to determine whether the _onFormSubmit has already been called or not, if yes, it disables the joining button so that we can prevent multiple calls
Please look at the loading status on tab for both the before/after fixed video attached below;
Before fix:
Screencast.From.2026-02-25.09-30-35.mp4
After fix:
Screencast.From.2026-02-25.09-44-12.mp4