ianstormtaylor / slate

A completely customizable framework for building rich text editors. (Currently in beta.)
http://slatejs.org
MIT License
29.73k stars 3.24k forks source link

`input` event is not fired when deleting text or typing numbers in <Editable> component #5669

Open kiryl-ivanou opened 3 months ago

kiryl-ivanou commented 3 months ago

Description I've faced the following issue: When watching input event on Editable component the following happens:

Important notice:

Platforms: - Android: works as expected in all cases

Recording Here is Android Chrome recording, there everything works as expected

https://github.com/ianstormtaylor/slate/assets/74236271/ad9e3c39-30e9-4512-bc06-54475378d7ee

Here is Desktop Chrome recording, does not work as expected:

https://github.com/ianstormtaylor/slate/assets/74236271/27b24f48-86cd-4ffe-bbda-dcac02c8e310

Here is iOS Safari recording, does not work as expected:

https://github.com/ianstormtaylor/slate/assets/74236271/b6e0e34e-2a6a-44ab-9307-cacd04575a80

Sandbox Here is the code sandbox with the reproduce: https://codesandbox.io/p/devbox/8yj9ww?file=%2Fpackage.json%3A18%2C30

Steps To reproduce the behavior:

  1. Go to sandbox
  2. Start typing on Slate ContentEditable input on the Desktop or iOS
  3. See that no history is recorder when typing numbers, symbols or deleting text

Expectation I expect input event to be fired consistently on all platforms as described here: https://developer.mozilla.org/en-US/docs/Web/API/Element/input_event

Environment

Context No additional context for now

dylans commented 3 months ago

This is very surprising. Could you please check 0.105.x for slate-react and see if it’s a regression (I’m at an airport and can’t do much at the moment).