Skip to main content

Bug Tracker

Side navigation

#14825 closed bug (invalid)

Opened February 21, 2014 02:13AM UTC

Closed March 07, 2014 08:49AM UTC

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

Reported by: snowman4415@gmail.com Owned by: snowman4415@gmail.com
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?

Attachments (0)
Change History (2)

Changed February 21, 2014 02:28AM UTC by dmethvin comment:1

owner: → snowman4415@gmail.com
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.

Changed March 07, 2014 08:49AM UTC by trac-o-bot comment:2

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!