org.eclipse.rap icon indicating copy to clipboard operation
org.eclipse.rap copied to clipboard

Scrolling continues unexpectedly

Open hendeltom opened this issue 1 year ago • 5 comments

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 avatar Mar 18 '24 11:03 hendeltom

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.

hendeltom avatar Mar 18 '24 11:03 hendeltom

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

ifurnadjiev avatar Mar 20 '24 09:03 ifurnadjiev

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 :-)

hendeltom avatar Mar 20 '24 11:03 hendeltom

Yes... Please create a PR.

ifurnadjiev avatar Mar 20 '24 12:03 ifurnadjiev

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

hendeltom avatar Mar 20 '24 13:03 hendeltom