* refactor Selection, deprecating old methods
* fix a few more things
* introduce an alternative for moveToOffsets
* add edge methods for move{start/end}OffsetTo
* fix selection return value
* fix deprecation warnings
* refactor transforms to make auto-generating easier
* refactor and deprecate selection transforms
* remove deprecation warnings from tests
* fix deprecation warnings in examples
As void-nodes now can be deleted, use a schema rule to normalize the document, and insert a paragraph when empty. Delete old "onDocumentChange" handler.
I realized I made a mistake in the scrollWindow function I was calculating the scrollBy position incorrectly. I decided to just switch to scrollTo instead of scrollBy
Also I was getting an issue where the `getBoundingClientRect().bottom` of one of my wrapper was incorrect when the height changed via newline or deletion. I'm not entirely sure why but I noticed that if I used wrapperRect.top + wrapper.offsetHeight it gave the correct bottom so I swapped to use that instead. Let me know if there's any issue with these changes.
Also I'm wondering is there anyway to add tests for these changes? I'm not too familiar with testing for scroll
* Fix jumpy scroll behaviour
I'm not sure if this is the best fix for the issue (I would have liked it to allow the browser to deal with moving the cursor into view.) but for now I think this is better than what it was before. I tried to imitate what chrome was doing when the cursor was out of view. (Except when it was partially in view but I decided to just keep it simple)
This basically checks the cursor's position and if it isn't in view it'll move the cursor into the middle of the view.
Fixes#279Fixes#589
* Subtract Height