sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
803 stars 38 forks source link

Changing the window width causes vertical scrolling issues #4399

Open kitzinga opened 3 years ago

kitzinga commented 3 years ago

Description

Changing the window width causes intermittent vertical scrolling issues. I believe this is a macOS problem, as I sometimes get a similar effect in Safari.

Steps to reproduce

  1. Start Sublime Text in safe mode
  2. To make the problem obvious, open a large text document (20+ pages)
  3. Move the mouse pointer over the right hand window border, so that it turns into a double-headed arrow resize pointer
  4. Hold down the left mouse button
  5. Move (flick) the pointer quickly a short distance to the left and release the left mouse button. Try and release with the mouse pointer over the scroll bar (possible as the window resize lags behind the pointer)
  6. Finally just move the mouse pointer back over the scroll bar, away from the puck

Expected behavior

I expected the window to resize with no intermittent scrolling issues.

Actual behavior

The window does resize normally. However intermittent scrolling issues occur. The problem is that sometimes after resizing, moving the pointer over the scroll bar area (away from the puck) causes the puck to quickly move towards the pointer. This happens WITHOUT clicking any mouse buttons. It does not go away until the following normal operation is performed.

During normal operation, it is possible to:

  1. Move the mouse pointer over the scroll bar away from the puck
  2. Hold down the left button
  3. ...and the puck moves to the pointer

Essentially, resizing (as described above) is activating this functionality, but without having the left button held down

Environment

torsj commented 5 months ago

A similar bug occurs when changing the window width on the left hand side while the "Open Files" side bar is shown. The window width change as expected, but the file in the bar near the cursor is selected for vertical repositioning. The file stays selected until ESC is pressed, or a left mouse click done.

Dragging a file in the Open Files side bar should not start when the 'change width' cursor is shown.

This behavior is 100% reproducible.

I also have the same problem with the right hand margin that the original poster described.

Environment: Build: 4169 OS: macOS 13.1 I've not tested this on other platforms.