openhab / openhab-webui

Web UIs of openHAB
Eclipse Public License 2.0
212 stars 232 forks source link

[BasicUI] Fix slider behaviour and implement two different modes #2535

Closed lolodomo closed 3 weeks ago

lolodomo commented 4 weeks ago

Fix #2525 Also related to openhab/openhab-core#4084 and openhab/openhab-core#3430

Two behaviour modes are now supported.

The brightness slider of the colorpicker widget is also updated to send regular new color commands when moving the slider.

Signed-off-by: Laurent Garnier lg.hc@free.fr

lolodomo commented 3 weeks ago

Change tested with success using Firefox, Chrome and Edge on Windows 10 and using Chrome on an Android phone.

Note that the previous implementation tries to handle browsers not respecting the standard* but with problems with all browsers respecting this standard. I can"t test with Safari browser but I read that Safari respects the standard so it should work well.

*Expected behaviour for a browser is to trigger "input" events when the slider is moving but not "change" events. "change" event should be triggered only when the slider is finally released. I read that 10 years ago, browsers like Internet Explorer were triggering "change" events while the slider was moving.