MurhafSousli / ngx-scrollbar

Custom overlay-scrollbars with native scrolling mechanism
https://ngx-scrollbar.netlify.app/
MIT License
610 stars 99 forks source link

Scrollbar shrinks when mouse pointer is on the edge of the screen (scrollbar control padding area) #300

Closed hakimio closed 3 years ago

hakimio commented 4 years ago

Reproduction

Steps to reproduce:

  1. Position the scrollbar at the edge of the screen
  2. Set scrollbar size and hover sizes to different values
  3. Move your mouse to the very edge of the screen

Expected Behavior

The hover size should be used when mouse pointer is at the very edge of the screen.

Actual Behavior

When the mouse pointer is at the very edge, scrollbar contracts again.

Long story short, the hover size should be applied when hovering over scrollbar-y.scrollbar-control element, not on child .ng-scrollbar-track.

MurhafSousli commented 4 years ago

I don't think this is the behavior everyone wants, most users would want the hover size to be set when the pointer is over the actual scrollbar not including the padding

hakimio commented 4 years ago

Current behavior causes flickering when user hovers on the tiny "padding". I am sure nobody wants that. Also, "perfect scrollbar" doesn't have this "feature".

MurhafSousli commented 4 years ago

Why wouldn't you remove the tiny padding?

hakimio commented 4 years ago

Setting --scrollbar-padding to 0 causes ngx-scrollbar to break.

hakimio commented 4 years ago

Also, it looks pretty bad without the padding.

MurhafSousli commented 4 years ago

Use 0px not 0 because the css variable is involved in other CSS calculation

hakimio commented 4 years ago

Still my point stands: it looks bad without the padding and flickering of the thumb width is unwanted behavior.

MurhafSousli commented 4 years ago

Let's keep this open and see if other users is also interested in this

hakimio commented 4 years ago

If you don't agree and don't plan to do anything about it anytime soon, feel free to just close with "works as intended".

MurhafSousli commented 3 years ago

merged in v7.4.0