Bug Tracker

Modify

Ticket #10548 (closed bug: invalid)

Opened 19 months ago

Last modified 19 months ago

val(value) does not send change events

Reported by: slinkp@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: git
Keywords: Cc:
Blocking: Blocked by:

Description

See  http://api.jquery.com/val/#comment-117202237 This is rather surprising.

It's possible to work around in your own code by manually sending the event, but this may not be possible if the relevant val(value) call is in third-party code. (For example: I want to trigger a function whenever a Calendrical widget updates a date input field, and I can't.)

Change History

comment:1 Changed 19 months ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

The browser's native behavior is to *not* fire events when the value property is changed. Thus we'd be introducing a difference from native behavior. Also, it would mean that changing the value of an input within the change event handler (for example, reformatting it) would cause infinite recursion.

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.