Bug Tracker

Opened 9 years ago

Closed 9 years ago

#14825 closed bug (invalid)

val('') doesn't fire 'input' event

Reported by: [email protected] Owned by: [email protected]
Priority: undecided Milestone: None
Component: unfiled Version: 1.11.0-rc1
Keywords: Cc:
Blocked by: Blocking:

Description

Changing a text input's value with jQuery.val() doesn't fire the DOM input event, breaking everything that normally relies on this specific event for an on-change handler.

https://developer.mozilla.org/en-US/docs/Web/Reference/Events/input

Use case: being able to type into a text input or use a jQuery plugin to choose field input, and then using the input event to trigger an auto-completing feature. When the jQuery plugin is used to set the text input value via .val(), the auto-compete will not be triggered and the .trigger('input') must be manually used.

Why would this not be intended functionality?

Change History (2)

comment:1 Changed 9 years ago by dmethvin

Owner: set to [email protected]
Status: newpending

Please provide a test case. If you're also saying jQuery maliciously tries to hide this event, please provide a test case that shows how it works with plain DOM and is hidden when you use jQuery.

comment:2 Changed 9 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.