svrollbar icon indicating copy to clipboard operation
svrollbar copied to clipboard

Scrollbar appear on hover?

Open brian-hay opened this issue 3 years ago • 9 comments

Thanks for the component.

Is there a way to make the scrollbar appear on contents hover if 100% of contents aren't visible i.e. if there's stuff to scroll to?

At present it seems the scrollbar only appears when user attempts to scroll but there's no indication, by way of a visible scrollbar, that the area is scrollable.

brian-hay avatar Aug 27 '21 07:08 brian-hay

@brian-hay i am so sorry for my late response. thank you for your feature request.

Is there a way to make the scrollbar appear on contents hover if 100% of contents aren't visible i.e. if there's stuff to scroll to?

there is no way to do so, but i have a plan to make scrollbar visible for first view/rendering (just like chrome does).

daylilyfield avatar Mar 14 '22 17:03 daylilyfield

Just seconding that this would be a fantastic feature. My current solution is to always show scrollbars if there's content to scroll to, but it's pretty ugly compared to a more intelligently discoverable/visible scrollbar like you suggested

madeleineostoja avatar Apr 01 '22 04:04 madeleineostoja

I'd like this feature as well.

Sometimes I move my mouse to the right side of the viewport and "click" anywhere on the scrollbar track to scroll up/down the page. With the way svrollbar is currently implemented there's no way to do that because it completely adds/removes the scrollbar from the DOM if there's no scrolling. It would be more ideal if the svrollbar was always there but transitioned to opacity: 0 if there was no scrolling or hover detected. But if the user scrolled or hovered over the track it would fade in and if the user clicks on a part of the track it would scroll to that position.

oneezy avatar Apr 03 '22 13:04 oneezy

i have just released v0.11.0 that has a new feature initiallyVisible. enabling this property, scrollbar is visible if content is scrollable and content does not scrolled yet.

daylilyfield avatar Apr 03 '22 15:04 daylilyfield

Amazing! Thank you for the quick fix!

madeleineostoja avatar Apr 03 '22 23:04 madeleineostoja

Amazing! Thank you for the quick fix!

@madeleineostoja he didn't fix the issue mentioned here

oneezy avatar Apr 04 '22 14:04 oneezy

Oh true, I hadn't tested initiallyVisible yet. Couldn't you achieve that behaviour with alwaysVisible and your own CSS on the scrollbar? Though I do think that alwaysVisible should only apply if the area is scrollable (ie: content > 100% height of container), which isn't the current behaviour

madeleineostoja avatar Apr 05 '22 00:04 madeleineostoja

Couldn't you achieve that behaviour with alwaysVisible and your own CSS on the scrollbar?

yeah i suppose that would be a pretty simple fix @madeleineostoja though there would be that 100% height issue you mentioned.

. . .

I also said this above but it doesn't really apply to this particular issue,,

Sometimes I move my mouse to the right side of the viewport and "click" anywhere on the scrollbar track to scroll up/down the page.

I guess it would be the next step though 😜 I can create a separate issue/ feature request for that if you'd like

oneezy avatar Apr 05 '22 09:04 oneezy

Made a more specific issue for that https://github.com/daylilyfield/svrollbar/issues/9

madeleineostoja avatar Apr 05 '22 22:04 madeleineostoja