Make change event always fire as the user interacts with the knob#143
Make change event always fire as the user interacts with the knob#143aterrien merged 1 commit intoaterrien:masterfrom
Conversation
That is, when using: - touch - wheel - typing (by binding to the "input" event) Previously, typing did not update the knob until focus was lost (and no change event was fired), and using the keyboard arrows did not fire any change events. Also move event triggering to val() and change() so it works always in the same way and less duplication exists. Similar to aterrien#130 but fixes an issue with `diplayPrevious`
Make change event always fire as the user interacts with the knob @amuino
|
Thank you amuino ! |
|
Hi amuino, after this merge I started to experiment troubles in my application. After a long investigation I found that this new behaviour introduces a sort of... loop. I use: $('.dial').val(27).trigger('change');to set the value, as the documentation tells. I cycle that in a |
|
@ACXgit that is the kind of inconsistencies that I wanted to avoid… so we kind of need opposite things! Anyway, I think you can workaround it on your event handlers by using some flag. Something like… ... and then on the event handler ... (I've written that from memory, so there might be errors and better options for your specific code) |
|
Thank you for the suggested workaround, but sadly it does not work in my case, because I need I also noticed a possibly worse issue after this merge: I can't see the numeric indicator change while dragging the knob with the mouse. The value changes only when I release the mouse. In previous versions that wasn't the default behaviour (the value was changing in real time). |
|
Afraid to affect everyone :) |
|
This got reverted? Any chance it can be added again? Not having the change event fire for changes with mousewheel is quite annoying. |
That is, when using:
Previously, typing did not update the knob until focus was lost (and
no change event was fired), and
using the keyboard arrows did not fire any change events.
Also move event triggering to val() and change() so it works always
in the same way and less duplication exists.
Similar to #130 but fixes an issue with
diplayPrevious