eclipse-rap / org.eclipse.rap

Eclipse RAP Runtime (Remote Application Platform)
https://www.eclipse.org/rap/
Eclipse Public License 1.0
17 stars 19 forks source link

Scrolling continues unexpectedly #179

Open hendeltom opened 5 months ago

hendeltom commented 5 months ago

Scenario:

  1. Pick a slider's thumb with the mouse and start scrolling
  2. leave the area of the RAP application (move the mouse cursor out of the the browser tab's body area) while the mouse button is still pressed
  3. release the mouse button outside of the RAP application
  4. move the mouse cursor back into the RAP application without any mouse button pressed

--> the slider immediately starts to react to mouse movements even that no mouse button is pressed; you have to click somewhere in the RAP application to stop scrolling.

hendeltom commented 5 months ago

The problem is IMHO in AbstractSlider._onThumbMouseMove() (AbstractSlider.js, line 249) It lacks a check whether or not the main mouse button is pressed; and if that's not the case the scrolling operation should terminate as AbstractSlider._onMouseUp() does.

ifurnadjiev commented 5 months ago

I'll take a look if button check in AbstractSlider._onThumbMouseMove() will solve the problem.

hendeltom commented 5 months ago

I've cloned the RAP repo and committed a change to my clone - see https://github.com/hendeltom/org.eclipse.rap/commit/45a47ec4a0fbd47a9714aa77a1257526aeb93fac

If that's ok for you I could create a PR from this. Btw., ECA is signed :-)

ifurnadjiev commented 5 months ago

Yes... Please create a PR.

hendeltom commented 5 months ago

I've just created the PR - https://github.com/eclipse-rap/org.eclipse.rap/pull/180. How's the reviewer assigned?