use native character insertion to fix browser/OS text features. #3293
…kering spellcheck, autocorrect, text shortcuts, etc.) See ianstormtaylor#3293. move some checks into previous if statement, remove commented out code move native behavior into `slate-react`, and remove any external interface dont use native editing if marks are set, as a new node will be inserted match -> above remove nativeOperationsQueue from editor
This PR in slate: ianstormtaylor#3293 causes an exception in Slate about not being able to find a DOM node for the selection while typing after a call to `Editor.insertText("\n")`. The workaround here is to turn off native insertion if the user is inserting text in a text node that ends in a new line character ("\n").
Strong +1 to this PR: it fixes some other quirks. For example, we've been working on single-line Slate and this allows horizontal scroll as you type (like an input field) to work properly. Seems like the path forward.
I believe this breaks the markdown shortcuts example: since all of the operations get queued up, it's hard to figure out what to do to effectively "undo" the typing that will happen beforehand. I wonder if there's a good heuristic to still preventDefault if we're queueing up certain operations, or if we should provide some hook for plugins to tell that they don't want this functionality because they're messing with structure.
Edit: my quick fix (I'm running off this branch), which is obviously less than ideal, is to perform the actual modification inside a
…kering spellcheck, autocorrect, text shortcuts, etc.) move some checks into previous if statement, remove commented out code move native behavior into `slate-react`, and remove any external interface dont use native editing if marks are set, as a new node will be inserted match -> above remove nativeOperationsQueue from editor bail out of native queueing and immediately flush events if non insert_text operation is being applied.
I have the conversion, can put up a new PR tomorrow with it.…
On Sun, Sep 20, 2020 at 6:40 PM brycedewitt ***@***.***> wrote: Checking in on this, is anyone actively working on a functional conversion right now? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#3293 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AACY4JUDLV7ECTKNQHND733SG2VJNANCNFSM4JZHIYIQ> .