-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
bug: ionic/react Duplicate firing of onClick handlers during rapid click in Firefox responsive design mode #25882
Comments
Thanks for the report. This may be a browser quirk as I am able to reproduce this outside of Ionic: https://codesandbox.io/s/nice-dawn-f1l43c?file=/src/App.tsx Is this issue impacting any apps your have running in production? |
Hmm, I'm not seeing the duplicate events in the sample you provided, even when I put it in responsive mode. When I run https://f1l43c.csb.app/ with the FF debugger open in responsive mode, I get the expected behavior of one event per click. As far as prod impact, I'd say negligible. It's a production app, but it seems unlikely that people would be running it with the Firefox debugger open in mobile/responsive mode. I only noticed because I run that way for responsive testing. I haven't tested for this behavior on a mobile device running Firefox. Ionic uses webkit for native apps anyway, right? Thanks for the quick look! |
Thanks! This helps better identify the impact. At this point, I am able to reproduce this issue outside of Ionic, so I am not sure this is something we are able to fix. It might be better to file some feedback on Mozilla's Bug Reporter. I will note that I was missing some necessary code in my original reproduction that I have since added: double-click-firefox.movI did notice that this issue only happens when the "Touch simulation" button is enabled, further indicating that this may be a quirk with the mobile simulation on Firefox.
WebKit is only used on iOS. Android will use Chromium when running as a standalone native app. |
Ok thanks, I think we can close this. |
Filed with Mozilla https://bugzilla.mozilla.org/show_bug.cgi?id=1789674 |
Thanks for filing a ticket! |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Prerequisites
Ionic Framework Version
Current Behavior
This only happens in Firefox (not Chrome). Here's a visual demo: https://user-images.githubusercontent.com/1068356/188532214-96950c3a-236a-49d7-87ec-5072ca97adf4.mp4
Using the following code, or using this Codesandbox demo (https://codesandbox.io/s/determined-bohr-s30zng?file=/src/App.tsx:913-1244&resolutionWidth=320&resolutionHeight=675).
Open the Firefox debugger and set the device size to iPhone or something similar. Observe that rapid clicks produce duplicate
onClick
events.Expected Behavior
One
onClick
event per clickSteps to Reproduce
See above
Code Reproduction URL
https://codesandbox.io/s/determined-bohr-s30zng?file=/src/App.tsx:913-1244&resolutionWidth=320&resolutionHeight=675
Ionic Info
Additional Information
Could be related to #17321?
The text was updated successfully, but these errors were encountered: