mbostock / stack

A presentation library with intuitive, scroll-based navigation.
https://mbostock.github.io/stack/
Other
1.16k stars 163 forks source link

Resizing Safari Window causes scrolling... #22

Open dissidently opened 8 years ago

dissidently commented 8 years ago

In the demo:

https://mbostock.github.io/stack/

scrolling down works fine, but once down a few pages, if then resizing (vigorously) the Safari window, scrolling messages seem to be sent.

Perhaps this is a result of the resizing of the scroll bar hitting some limits that send scroll messages. But I'm only guessing.

This does not happen on the first slide/page. You'll need to go down a few pages/slides before resizing to see this happen.

mbostock commented 8 years ago

That’s not especially surprising. There’s some code to try to preserve the current scroll position in resize, but it’s probably not perfect, and I think Safari is more aggressive about deferring scroll events during resize. The problem is that the content resizes based on the width of the window, and the browser isn’t smart enough to maintain the vertical position automatically. If you discover a fix, let me know, but alas I have no plans to fix this myself.

dissidently commented 8 years ago

I know nothing about how to fix such things. We'll have to rely on the wonders of the open sores community.