You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe this comment will be helpful in the future. I tried this in my CR that has native browser manipulation on simple insertions (#3076) and it also breaks. I'm new to all the InputEvent stuff, but seems like the beforeinput event is the synthetic React one. It looks the same as an insertText event, so I don't know a way to know if it's replacing text without looking at the DOM change after allowing the native manipulation to proceed. Problem is, Chrome messes up and deletes a lot of the nested elements for the text Nodes, so it breaks the Slates' reconciliation (maybe this is a bug, if I have more time I'll look into this, seems like DraftJS has had problems with Chrome unexpectedly changing if allowing native events).
I tried what happens in Chrome outside of React using the native beforeInput event which should support InputEvents level two, but it also reports as inputType of insertText. This doesn't make sense as the spec makes it seem like insertReplacementText is more appropriate. Using insertReplacementTest is how Safari reports the event. I raised a Chrome bug for for this in the meantime (1021460).
This may be fixable in Safari if we can use the native beforeinput event.
Do you want to request a feature or report a bug?
bug
What's the current behavior?
What's the expected behavior?
omw
should get deletedThe text was updated successfully, but these errors were encountered: