better save state before state change, removed is propagationstopped because it doesn't work on the document.