avoid rangeError by setting endOffset to 1 and calling collapse()
Merge remote-tracking branch 'origin/master' into fix-range-errors
Merge pull request #29 from oerpub/fix-range-errors

Fix range errors on book change.