Bug Tracker

Ticket #11764 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

Allow delegated non-native events on disabled elements

Reported by: jmarston Owned by: dmethvin
Priority: low Milestone: 1.8
Component: event Version: 1.7.2
Keywords: Cc:
Blocking: Blocked by:

Description

Currently jQuery does not call delegated event handlers for disable elements. This is to keep consistency between browsers because IE is the only browser that raises events on disabled elements (see #6911 and #8165).

It would be useful, however, if we could raise non-native events with trigger() on disabled elements and still have delegated handlers be run. Since jQuery would be handling the triggering, bubbling, and dispatching there wouldn't be any browser inconsistencies.

Change History

comment:1 Changed 3 years ago by dmethvin

#11765 is a duplicate of this ticket.

comment:2 Changed 3 years ago by dmethvin

  • Status changed from new to open

Related to #11382, see the discussion there.

comment:3 Changed 2 years ago by dmethvin

  • Owner set to dmethvin
  • Priority changed from undecided to low
  • Status changed from open to assigned
  • Component changed from unfiled to event
  • Milestone changed from None to 1.8

comment:4 Changed 2 years ago by dmethvin

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

Fix #11382. #11764. Only prevent click events on disabled elements.

We don't want a disabled link/button to register delegated clicks, but we do want events like mouseover or custom events.

This is a compromise, there is no perfect solution. Well, the browsers could be consistent about direct vs. delegated events but *that's* not gonna happen.

Changeset: 8a01c9201abb3a5311d5b0019b0322de89df6374

Note: See TracTickets for help on using tickets.