Remove calls to `Range.detach`

This method is a no-op, as demonstrated by console warnings in Chrome and https://developer.mozilla.org/en-US/docs/Web/API/range.detach.

Remove callsites.

Fixes #2142