report a bug
using browser spell check on rich text example on a text that has mark on chrome seems to loose selection and inserting the text on weird place. there are two behaviours on this depending on where it is performed.


tested on safari and it works fine. on Safari it doesn't seem to run onInput and that seems to be the problem.
Upon debugging it, it goes to onInput on chrome and returning after this line
const point = findPoint(anchorNode, anchorOffset, state) because point is null
text got replaced while preserving current active marks
@ianstormtaylor is this potentially related to a compatibility issues that affect firefox mentioned in https://github.com/ianstormtaylor/slate/issues/714 which now affect chrome as well?
@ianstormtaylor this seem to only happens in chrome.
It works fine on safari.
I also tried removing the spellcheck overwrite for firefox and it seems to works fine as well.
Do you remember what's the firefox's compatibility issue was since it might be the same one and it has been fixed on newer version of firefox?
Hey @isubastiCadmus I'm honestly not sure. Is this the same as #909?
Seems that the findPoint util for deriving native selection returns wrong result, I'm not confident enough for a PR, while I may bring a writeup explaining this.
@ianstormtaylor not sure if it is the same as #909 but it insert the next outside the span instead of replacing the text(first gif). @doodlewind yes it is either findPoint deriving native selection returns wrong result or chrome change the behaviour of context menu and resulting in slate loosing its selection(onBlur got triggered?)
@doodlewind any pointers on where I should start if I want to make a PR?
This now crashes in findDOMRange instead. http://recordit.co/VdwvtBxDXQ
@ianstormtaylor @CameronAckermanSEL @isubasti
Hi, I set a break-point to understand what is happening after rendering. It seems very strange about the rendered dom after editor change


This is a shot during the before.js/onInput
I find the reason; but I am not sure how to solve it in a neat way:
https://stackoverflow.com/questions/32298064/preventdefault-not-working-in-on-input-function
preventDefault is not working with input events
It seems DraftJs's solution about it is to reset nodeValue...
https://github.com/facebook/draft-js/blob/master/src/component/handlers/edit/editOnInput.js
Too complex, I give up. lol
Update:
this.props.editor.value.document.text==='help'@zhujinxuan nice find.I believe if this problem is fixed then problems on Android & IME might be solved, fingers crossed
I think it is fixed in https://github.com/ianstormtaylor/slate/pull/1695
Would you like to have a test?
seems to be fixed by #1695. Tried to enable spellcheck on firefox as well but no luck. It kinda looked like it's working but then when you start typing, it is not on the right position
Seems like this is fixed in newer versions of Slate. But if anyone is experiencing this, feel free to open another issue with reproduction case.