Simplebar in container with transform: scale(.5) cannot be scrolled with mouse drag
- Dominant language
- TypeScript
- Stars
- 6.4k
- Forks
- 527
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When you add a Simplebar element inside a div which has a style property `transform: scale(0.5);`, the mouse dragging of the vertical scrollbar will scroll in the wrong direction when you move the mouse. It seems that only scale values below 1 cause issues as far as i can tell.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to https://jsfiddle.net/32vzs7cq/
2. Try to scroll the list by dragging the vertical scrollbar
3. Issue: Moving down the cursor while holding the mouse button will cause the list to scroll up instead of down
**Expected behavior**
Adding a transform: scale to a parent of the simplebar element should not change the drag behaviour. The scroll drag should work the same.
**Reproducible example**
https://jsfiddle.net/32vzs7cq/
**Additional context**
This has probably something to do with this issue: https://github.com/Grsmto/simplebar/issues/274. As this drag issue is not included there, i created a new one.
**Your environment**
| Software | Version(s) |
| ---------------- | ---------- |
| SimpleBar | 5.3.9
| Browser | Chrome 107
| Operating System | Windows
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the reproducible JSFiddle at https://jsfiddle.net/32vzs7cq/ and compare the drag behavior with the context from issue #274. Investigate the scrollbar drag handling under a parent with transform: scale(0.5); done means dragging the vertical scrollbar moves the list in the same direction as the cursor in Chrome.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100