You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When acceptsFirstMouse: true, if the clicked element also has attached events to the corresponding mouse event used to simulate the first click (See dispatch-first-click.js), it will end up triggering them twice, because the first click trick will also trigger them synthetically.
This is a specially unwanted behaviour when the said element is disabled (e.g. <button>), which shouldn't trigger click events.
Possible Fixes
The code used to run this should also check for the disabled state.
Also, it needs check if the element already has attached events to avoid making them run twice.
I would PR something for this, but honestly I haven't come up with a good solution to address the second part without affecting some obscure cases.
I can still send a PR and wait for someone help me, tough...
The text was updated successfully, but these errors were encountered:
Issue
When
acceptsFirstMouse: true
, if the clicked element also has attached events to the corresponding mouse event used to simulate the first click (See dispatch-first-click.js), it will end up triggering them twice, because the first click trick will also trigger them synthetically.This is a specially unwanted behaviour when the said element is
disabled
(e.g.<button>
), which shouldn't triggerclick
events.Possible Fixes
The code used to run this should also check for the
disabled
state.Also, it needs check if the element already has attached events to avoid making them run twice.
I would PR something for this, but honestly I haven't come up with a good solution to address the second part without affecting some obscure cases.
I can still send a PR and wait for someone help me, tough...
The text was updated successfully, but these errors were encountered: