Opened 10 years ago
Closed 10 years ago
#30223 closed defect (bug) (fixed)
Customizer range controls don't update until the mouse is released
Reported by: | sublink | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | 4.0 |
Component: | Customize | Keywords: | has-patch |
Focuses: | javascript | Cc: |
Description
When adding customizer control with a type of range
, the preview JS doesn't receive an event until the mouse is released.
I believe the customizer is listening for the onchange event, but it looks like that should only be triggered when the user releases the mouse. To get continuous updates, you can use the oninput event, which will capture live updates in Firefox, Safari and Chrome, both from the mouse and the keyboard.
However, oninput is not supported in IE10, so you might have to combine the two event handlers.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
sublink: Thanks for the report! Yes, this is a good catch. For the widget controls added in 3.9, changes to the widget forms are being listened to via the
change
event but also theinput
(for non-IE) andpropertychange
events (for IE).So the following change could be made to address the problem:
src/wp-includes/js/customize-base.js
(Cleanup of JS coding standards notwithstanding.)