replaceRange triggers beforeSelectionChange

replaceRange triggers beforeSelectionChange which is unexpected.

see http://plnkr.co/edit/1ZS1lPEOxwHvsUDJs7fW?p=preview

That is intentional, though. Changing the document will change the selection, so the relevant events are fired.

ok but see the plunkr above, the selection does not change after replaceRange …