Scrolling does not work correctly in XHTML documents
Closed this issue · 1 comments
robertknight commented
When scrollIntoView
ascends the element tree it tests the tagName
property of elements to work out when it has reached the <body>
:
scroll-into-view/scrollIntoView.js
Line 202 in 2a3c18a
In an XHTML document (example) document.body.tagName
returns "body" rather than "BODY" as it does in HTML documents. See MDN docs.
The result is that the test incorrectly fails and the document is scrolled to the wrong location. In some limited testing, making the test case insensitive appears to resolve the issue.
KoryNunn commented
Published as 1.16.2, sorry I didn't get around to it sooner.