Closed krzema12 closed 6 years ago
The basic cause for this bug is not taking text nodes into account. It's because children
instead of childNodes
is used when getting child nodes of some node.
childNodes includes all child nodes, including non-element nodes like text and comment nodes. To get a collection of only elements, use ParentNode.children instead.
(https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)
The step forward is to used childNodes
and properly clone and animate text nodes.
Proof of concept of the above idea pushed on a temporary branch: https://github.com/krzema12/hypergravity/tree/wip-fix-for-not-all-elements
Confirmed it works on Windows and Linux.
Tested in Windows 8.1 and Ubuntu 16.04. Its because some parts of the text are not wrapped in any HTML tag. The reason why the terminal content is formated differently on various operating systems is unknown.
A quick fix may be to take the whole row nodes. Another idea is to post-process the chosen nodes so that they are wrapped in some span elements or something.