How about implementing the scroll functionality with `onWheel`
GuichiZhao opened this issue · 1 comments
Currently, scrolling happens because you put a seemingly random width/height to trigger the browser native scroll bar, and you expand the width/height when it is not "enough"
I suppose the same functionality can be implemented with a "fake" scroller bar. without the native scroll behavior coming into play all together. This can be done with an onWheel
event
Here is the reason I want this:
- Scroll offset is easier to calculate
- Even for the empty
div
native scroll may still introduce a performance panlty for a 10000000px content - The native scrollbar can be ugly to display
What do you think of the idea?
Currently, scrolling happens because you put a seemingly random width/height to trigger the browser native scroll bar, and you expand the width/height when it is not "enough"
I suppose the same functionality can be implemented with a "fake" scroller bar. without the native scroll behavior coming into play all together. This can be done with an
onWheel
eventHere is the reason I want this:
- Scroll offset is easier to calculate
- Even for the empty
div
native scroll may still introduce a performance panlty for a 10000000px content- The native scrollbar can be ugly to display
What do you think of the idea?
The same thing can be achieved via “fake” scrollbar, but it is much more work. This way, we get a lot of native functionality with no effort - e.g. native styles, moment, predictable behaviour with different input devices. We might implement it like this in future but, but it’s not a priority. If you want to take a stab at it, we’d be happy to accept a pull request.