Open bdesham opened 5 years ago
I tried a few approaches to fixing this but no luck so far. I suspect injecting the HTML on click is partly to blame, a few alternative footnote implementations I've seen that instantiate all popovers on start and then merely show/hide them don't present this issue.
On the latest refactor, I changed the way the popovers are instantiated: they are now created (but not mounted) once during setup, rather than every time the button is clicked.
Now, the problem still occurs, but only after popovers are mounted on the document for the first time. On subsequent activations, scrolling works as normal, which leads me to believe that inserting the element into the document does something to the event handler.
With Littlefoot 2.0.2 under Safari 12 on macOS, if you open a footnote that’s long enough to scroll, you can’t just place your cursor over the footnote text and scroll with the scroll wheel (or trackpad gesture)—this just scrolls the entire page. Instead, you have to click inside the footnote first and then the mouse/trackpad will work to scroll the footnote.
Firefox 67 and Chrome 75 on macOS do not have the same problem.
I don’t have a PR ready for this one, sorry :wink:
Steps to reproduce
Expected behavior: the footnote scrolls down, revealing more of the text.
Actual behavior: the entire page scrolls.
Minimal example
(This is the same example I used for #21.)