Skip to content

fix(room join): multiple button click disabled while submitting room join form#17007

Open
bandhan-majumder wants to merge 1 commit intojitsi:masterfrom
bandhan-majumder:fix-disable-multisub
Open

fix(room join): multiple button click disabled while submitting room join form#17007
bandhan-majumder wants to merge 1 commit intojitsi:masterfrom
bandhan-majumder:fix-disable-multisub

Conversation

@bandhan-majumder
Copy link
Contributor

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

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

@bandhan-majumder
Copy link
Contributor Author

@damencho can you please review this PR? 🙏

insecureRoomName: boolean;
isSettingsScreenFocused?: boolean;
isSubmitted?: boolean;
joining: boolean;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bandhan-majumder
Copy link
Contributor Author

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

WelcomPage.native.tsx

@bandhan-majumder
Copy link
Contributor Author

@damencho @jallamsetty1 can you please take a look at this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants