Skip to content
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

[Button]: is still clickable when disabled in Firefox #7164

Closed
jasdelreyes opened this issue Jun 12, 2023 · 6 comments
Closed

[Button]: is still clickable when disabled in Firefox #7164

jasdelreyes opened this issue Jun 12, 2023 · 6 comments
Assignees
Labels
1 - assigned Issues that are assigned to a sprint and a team member. ArcGIS Map Viewer Issues logged by ArcGIS Map Viewer team members. ArcGIS Online Issues logged by ArcGIS Online team members. browser-firefox Issues tied to the last 2 versions of Firefox browser. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. estimate - 5 A few days of work, definitely requires updates to tests. has workaround Issues have a workaround available in the meantime. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive p - high Issue should be addressed in the current milestone, impacts component or core functionality regression Issues that are caused by changes in a release, but were working before that. research Issues that require additional research in order to resolve or make decision.

Comments

@jasdelreyes
Copy link

Actual Behavior

Disabled button is still clickable in Firefox. When the button has the disabled prop set to true, the button is still clickable.

Expected Behavior

It is expected that when the disabled state is true, "interaction is prevented" as referred to in the Calcite doc.

Reproduction Sample

https://codepen.io/jasdelreyes/pen/yLQYegR?editors=100

Reproduction Steps

  1. Open https://codepen.io/jasdelreyes/pen/yLQYegR?editors=100 in the Firefox browser.
  2. Open the codepen link in Chrome or Safari.
  3. Observe that the disabled calcite button in the firefox browser still triggers clickable events.

Reproduction Version

calcite-components 1.4.2

Relevant Info

Firefox 114.0.1

Regression?

No response

Priority impact

p4 - not time sensitive

Impact

No response

Esri team

ArcGIS Online

@jasdelreyes jasdelreyes added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Jun 12, 2023
@github-actions github-actions bot added impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive ArcGIS Online Issues logged by ArcGIS Online team members. labels Jun 12, 2023
@geospatialem geospatialem added regression Issues that are caused by changes in a release, but were working before that. labels Jun 13, 2023
@geospatialem
Copy link
Member

Looks like this is a regression introduced in 1.3.0 with #6732.

@jcfranco The HTML spec mentioned in the PR has a comment regarding Firefox behavior. The team speculates this could be a Firefox bug, but its unclear.

@geospatialem geospatialem added p - high Issue should be addressed in the current milestone, impacts component or core functionality browser-firefox Issues tied to the last 2 versions of Firefox browser. research Issues that require additional research in order to resolve or make decision. estimate - 3 A day or two of work, likely requires updates to tests. estimate - 5 A few days of work, definitely requires updates to tests. ArcGIS Map Viewer Issues logged by ArcGIS Map Viewer team members. and removed needs triage Planning workflow - pending design/dev review. estimate - 3 A day or two of work, likely requires updates to tests. labels Jun 13, 2023
@geospatialem
Copy link
Member

geospatialem commented Jun 13, 2023

Research will be conducted for next steps on a fix for Firefox with the disabled button. Same as #7043 - this issue will remain open due to the workarounds mentioned below.

@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Jun 13, 2023
@geospatialem
Copy link
Member

geospatialem commented Jun 13, 2023

A workaround for FF includes adding the style="pointer-events:none" to the disabled button:

<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;
  }
});

@geospatialem geospatialem added the has workaround Issues have a workaround available in the meantime. label Jun 13, 2023
@driskull driskull removed their assignment Jun 14, 2023
@driskull
Copy link
Member

going to un-assign myself since @jcfranco already has this one in progress.

@jcfranco
Copy link
Member

@geospatialem This is indeed a duplicate of #7043. Maybe we can copy any relevant information over and close this one?

Worth noting that the proposed workaround would prevent users from wiring up a tooltip with a disabled component (#5318).

@geospatialem
Copy link
Member

Closing in favor of #7043. The workarounds, with the caveat of a tooltip with the disabled button are mentioned in #7043 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - assigned Issues that are assigned to a sprint and a team member. ArcGIS Map Viewer Issues logged by ArcGIS Map Viewer team members. ArcGIS Online Issues logged by ArcGIS Online team members. browser-firefox Issues tied to the last 2 versions of Firefox browser. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. estimate - 5 A few days of work, definitely requires updates to tests. has workaround Issues have a workaround available in the meantime. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive p - high Issue should be addressed in the current milestone, impacts component or core functionality regression Issues that are caused by changes in a release, but were working before that. research Issues that require additional research in order to resolve or make decision.
Projects
None yet
Development

No branches or pull requests

4 participants