openhab / openhab-webui

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

[BasicUI] Slider not working well, especially in Firefox #2525

Closed lolodomo closed 3 weeks ago

lolodomo commented 1 month ago

Which UI are you reporting an issue for?

The problem

When clicking in the slider using a mouse, two problems can occur:

  1. Basic UI emits an event to the bus but with the old value of the slider => the item state is not changed
  2. Basic UI emits a correct event to the bus but the feedback SSE event is ignored and the value at the left of the slider is not updated

The first issue occurs almost all the time when using Firefox but not when using Chrome. The difference between Firefox and Chrome is that Firefox receives first event mouseup and then event change, while Chrome receives events in the reverse order. Maybe the new value is not yet available until event change is received.

The second problem can occur in Firefox and in Chrome. It could be because resuming of listening to SSE events is resumed too late.

Expected behavior

  1. Correct event with the new value should be sent to the bus when using Firefox.
  2. The value displayed at left of the slider should always be correctly refreshed.

Your environment

Windows 10, with Firefox or Chrome browser.