When you change the a to a div, it works as expected. Repro: https://w3c.github.io/editing/repros/497.html Related: https://github.com/w3c/editing/issues/496