rrweb-io / rrweb

record and replay the web
https://www.rrweb.io/
MIT License
16.86k stars 1.44k forks source link

:hover class disappears when elements are modified #258

Open Juice10 opened 4 years ago

Juice10 commented 4 years ago

When playing around with a recording of todomvc I noticed that any time an element is modified it loses its :hover class.

Expected behaviour

After inserting or modifying nodes we should re-apply the :hover class to these (new) nodes.

Example

The "X" delete button is triggered on hover on a todo item on http://todomvc.com/examples/backbone/ Once you check an item a number of classes get appended to the li that is triggering the :hover to display the X button. In a browser the :hover persists, but in todomvc the .:hover disappears. I did a repl of this in action: https://gist.github.com/Juice10/f3734e83e515feaa90cfb2c5b7dc8cf8

Let me know if there is anything I can do to help.

Yuyz0112 commented 4 years ago

@Juice10 Thanks for the details! I will check if there is a good strategy to handle this.