Bug Tracker

Modify

Ticket #8169 (closed bug: invalid)

Opened 2 years ago

Last modified 14 months ago

Change does not fire on input[type=number] on Chrome

Reported by: mikhuang@… Owned by: mikhuang@…
Priority: high Milestone: 1.next
Component: event Version: 1.4.3
Keywords: Cc:
Blocking: Blocked by:

Description

To reproduce on Chrome OSX 8.0.522.237:

<input type="number"> <script> $('[type=number]').change(function(){

alert(this.value);

}) </script>

Then try scrolling

Change History

comment:1 Changed 2 years ago by rwaldron

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

comment:2 Changed 2 years ago by rwaldron

Duplicate of #8148.

comment:3 Changed 2 years ago by rwaldron

  • Priority changed from undecided to high
  • Version changed from 1.4.4 to 1.4.3
  • Component changed from unfiled to event

comment:4 Changed 2 years ago by jitter

Why is this a duplicate of #8148? There is nothing which indicates a call to .focus() is involved.

Please submit a reduced test case, which reproduces the issue you are experiencing, on  http://jsfiddle.net. So that we can investigate this issue further. Also make sure to read the link given below, in order to provide a most useful bug report.


 How to report bugs

comment:5 Changed 2 years ago by rwaldron

  • Status changed from closed to reopened
  • Resolution duplicate deleted

comment:6 Changed 2 years ago by rwaldron

  • Status changed from reopened to open

comment:7 Changed 2 years ago by jitter

  • Owner set to mikhuang@…
  • Status changed from open to pending

As stated above, please provide a reduced test case and more information what you think is wrong / what expected behavior is and how this is jQuery's fault.

This quick stab at making a  test case for this (note it doesn't use jQuery) shows that Chrome fires the change event only when the input loses focus and the value has changed. This is afaik also adhering to the HTML 5 specification.

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

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

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!

comment:9 Changed 19 months ago by tutec@…

Have the same issue. Can replicate the error on URL submitted by jitter  http://jsfiddle.net/jitter/q3MEx/. How may I help?

comment:10 Changed 19 months ago by rwaldron

That is the correct behaviour for a "change" event. See:  http://api.jquery.com/change/

The change event is sent to an element when its value changes. This event is limited to <input> elements, ><textarea> boxes and <select> elements. For select boxes, checkboxes, and radio buttons, the event is fired immediately when the user makes a selection with the mouse, but for the other element types the event is deferred until the element loses focus.

comment:11 Changed 14 months ago by james@…

just a thought pertaining to ops intent of allowing the rolling up and down to trigger some change:

one could bind the "mouseup" event so that the change could be handled.

, although we would still need the "change" event for direct changes to the input box via keyboard

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.