-
Notifications
You must be signed in to change notification settings - Fork 77
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
Disabled buttons are clickable in Firefox #7043
Comments
Was able to repro in FF (Chrome and Edge are performing as-expected). Still repro in last night's |
If it matters for prioritization purposes, this impacts the Editor widget in the JS SDK. |
There are two workarounds available, however it will prevent providing a <calcite-button style="pointer-events:none" disabled id="example-button">Open modal</calcite-button> or checking if the button is disabled in the event listener: button.addEventListener("click", (evt) => {
if (evt.target.disabled) {
return;
} else {
modal.open = true;
}
}); |
…ox (#7107) **Related Issue:** #7043 ## Summary This applies a workaround for Firefox not firing capture events before non-capture ones to block mouse events when components are disabled. ### Notable changes * added `connectInteractive`/`disconnectInteractive` utils, solely to support Firefox * moved user agent utils to `browser.ts` ### Additional info * [Firefox recently fixed this](https://bugzilla.mozilla.org/show_bug.cgi?id=1731504) to follow the spec and it should ship in version 116. * https://wpt.live/dom/events/EventTarget-dispatchEvent.html is the relevant web platform test. * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#useCapture 👇 > Note: For event listeners attached to the event target, the event is in the target phase, rather than the capturing and bubbling phases. Event listeners in the capturing phase are called before event listeners in any non-capturing phases.
Installed and assigned for verification. |
@geospatialem Here's a codepen I used to look for regressions related to #5318. Sharing in case it helps. |
Verified with Franco's codepen above and https://codepen.io/geospatialem/pen/rNQMPXg in |
Actual Behavior
Clicking a disabled button fires the
onClick
eventExpected Behavior
Clicking a disabled button does not fire the
onClick
eventReproduction Sample
https://codepen.io/mpayson/pen/VwENeyv
Reproduction Steps
Reproduction Version
1.4.0
Relevant Info
No response
Regression?
No response
Priority impact
p2 - want for current milestone
Impact
Maybe this could be lower priority, we can work around it by ignoring the click even when the button is disabled
Esri team
N/A
The text was updated successfully, but these errors were encountered: