Ticket #5945 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

Button: Disabled buttons still allow clicks

Reported by: spudly Owned by:
Priority: minor Milestone: 1.8.14
Component: ui.button Version: 1.8.4
Keywords: click event disabled Cc:
Blocking: Blocked by:

Description (last modified by scott.gonzalez) (diff)

When you disable a button widget, the click events still fire. I expected events to somehow be turned off somehow when the button is disabled, like native button elements.

This only occurs on elements that can't be disabled via the disabled attribute.

Change History

comment:1 Changed 4 years ago by scott.gonzalez

#6855 is a duplicate of this ticket.

comment:2 Changed 4 years ago by scott.gonzalez

  • Milestone changed from TBD to 1.9

comment:3 Changed 4 years ago by scott.gonzalez

  • Status changed from new to open
  • Description modified (diff)
  • Summary changed from Disabled buttons still fire click event to Button: Disabled buttons still allow clicks

comment:4 Changed 4 years ago by eikes

Last edited 4 years ago by eikes (previous) (diff)

comment:5 Changed 4 years ago by eikes

edit: updated pull request number

comment:6 follow-up: ↓ 11 Changed 4 years ago by Eike Send

  • Status changed from open to closed
  • Resolution set to fixed

Button: stop disabled button from firing click events. fixes #5945. Behavior was inconsisten between BUTTON and A elements.

Changeset: a7f1659cdc99222a733ed2edbd7d00dc57c30227

comment:7 Changed 4 years ago by Scott González

Merge pull request #207 from eikes/bug-5945

Button: stop disabled button from firing click events. fixes #5945.

Changeset: af5b5b19483a0a18abe1fbb43cb534a5485f0804

comment:8 Changed 4 years ago by Eike Send

Button: stop disabled button from firing click events. fixes #5945. Behavior was inconsisten between BUTTON and A elements. (cherry picked from commit a7f1659cdc99222a733ed2edbd7d00dc57c30227)

Changeset: 4c218eeb0a4e6b06d055fcfe0b45ff034ecbfa43

comment:9 Changed 4 years ago by scott.gonzalez

  • Milestone changed from 1.9 to 1.8.13

comment:10 Changed 4 years ago by scott.gonzalez

#5951 is a duplicate of this ticket.

comment:11 in reply to: ↑ 6 ; follow-up: ↓ 12 Changed 4 years ago by JasonC

Replying to Eike Send:

Button: stop disabled button from firing click events. fixes #5945. Behavior was inconsisten between BUTTON and A elements.

Changeset: a7f1659cdc99222a733ed2edbd7d00dc57c30227

The behavior of disabled anchor elements does not match previous jQuery UI versions. See examples.

Also, disabling the hyperlink functionality of anchor elements requires the element to have a click handler that returns false. I believe it has been this way for some time. Is there any way to remove this requirement?

comment:12 in reply to: ↑ 11 ; follow-up: ↓ 13 Changed 4 years ago by scott.gonzalez

  • Status changed from closed to reopened
  • Resolution fixed deleted
  • Milestone changed from 1.8.13 to 1.9

Yeah, that should be preventing the default in addition to stopping propagation.

comment:13 in reply to: ↑ 12 ; follow-up: ↓ 14 Changed 4 years ago by JasonC

Replying to scott.gonzalez:

Yeah, that should be preventing the default in addition to stopping propagation.

If someone managed to fix it; could it be added to 1.8.14? If so, when would that fix need to happen by?

comment:14 in reply to: ↑ 13 Changed 4 years ago by scott.gonzalez

Replying to JasonC:

If someone managed to fix it; could it be added to 1.8.14? If so, when would that fix need to happen by?

Yes. We don't set dates, but we release about once per month.

comment:15 Changed 4 years ago by Andrew Powell

  • Status changed from reopened to closed
  • Resolution set to fixed

Button: adding event.preventDefault. Fixes #5945 - Disabled buttons still allow clicks

Changeset: 597a313ab67bc10627d9c17c941776514ea5bd7c

comment:16 Changed 4 years ago by Andrew Powell

Button: adding event.preventDefault. Fixes #5945 - Disabled buttons still allow clicks (cherry picked from commit 597a313ab67bc10627d9c17c941776514ea5bd7c)

Changeset: 3735bab147b663767d2268b90ac27234b1c19fbf

comment:17 Changed 4 years ago by scott.gonzalez

  • Milestone changed from 1.9 to 1.8.14
Note: See TracTickets for help on using tickets.