Bug Tracker

Modify

Ticket #11764 (closed enhancement: fixed)

Opened 2 years ago

Last modified 22 months 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 2 years ago by dmethvin

#11765 is a duplicate of this ticket.

comment:2 Changed 2 years ago by dmethvin

  • Status changed from new to open

Related to #11382, see the discussion there.

comment:3 Changed 22 months 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 22 months 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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.