dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.44k stars 10.02k forks source link

How can I get scroll position in scroll view? #7357

Open danroth27 opened 5 years ago

danroth27 commented 5 years ago

From @thainbreese on Thursday, 07 February 2019 07:40:21

Hi

I am going to build a scroll view component without using JS interop. The view and scroll bar is separated so I want to know the scroll position in the scroll bar. How can I know the scroll position in onscroll event?

Copied from original issue: aspnet/Blazor#1783

mkArtakMSFT commented 5 years ago

@SteveSandersonMS, I assume there is currently no parameter passed to the scroll event handler, which represents this information?

Lupusa87 commented 5 years ago

It will be great if scroll event will provide all necessary data.

Before that you can check this blazor scrollbar component prototype, svg based, no js.

https://lupblazorscrollbar.z20.web.core.windows.net/

https://github.com/Lupusa87/BlazorScrollbar

arivoir commented 5 years ago

I still wonder f there is any way to get the scrollTop without using JS. Anyone knows?

ghost commented 4 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

JeanFTP commented 2 years ago

Any update on passing properties to the EventArgs object ?

TanayParikh commented 2 years ago

Kind of related; just wanted to reference https://developer.mozilla.org/docs/Web/API/MouseScrollEvent. This API has been deprecated.

Regestea commented 8 months ago

Is this problem so difficult that it will last four years and still remain unsolved ?