View.state.selection.from is wrong after view.focus()

In the function linkItem when adding the following:

toggleMark(markType, attrs)(view.state, view.dispatch)
console.log(view.state.selection.from)
view.focus()
console.log(view.state.selection.from)

and after inserting a link, the value of view.state.selection.from jumps from the current value to zero. So after view.focus() the selection is wrong.

This looks like this issue.