googlearchive / paper-slider

A slider à la Material Design
16 stars 18 forks source link

`on-input` support #30

Closed David-Mulder closed 9 years ago

David-Mulder commented 9 years ago

HTML5 input[type='range'] supports on-input to get the value whilst dragging. It would be great if you guys added support for this. Additionally I was wondering how one would achieve this now? Binding the value changed event also only triggers after the user releases the mouse.

jkillian commented 9 years ago

Agreed, seems like there should be an event for this, :+1:

bap2pecs0 commented 9 years ago

Yes. I think it would be very useful. So for now have you guys found any alternative solutions?

David-Mulder commented 9 years ago

@frankiefu Why did you decide to deviate from the way it works in HTML5? Calling it input as proposed seems to make a lot more sense.

frankiefu commented 9 years ago

input event fires when value changes, whereas immediate-value-change fires when immediate-value changes. It seems better to clearly distinguish them since they are not really the same.

David-Mulder commented 9 years ago

@frankiefu Either you're making a really odd argument or you might check out how the two relevant events differentiate from eachother.

As the element is already copying some of the input[type='range'] spec it would be good to keep in line with it anywhere possible. I mean, binding to the immediateValue and listening for a change was already possible, but within a non-polymer application context exposing a polymer-like interface instead of a HTML-like interface seems to be a pretty poor idea.

The alternative option if you really wish to keep immediate-value-change is dropping the change event and instead implementing the value-change event. At the very least it will cause less confusion than this construction, although personally I would not be in favour of it (as I think providing a familiar interface is a good thing and many paper elements are exposing HTML-like interfaces).