Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent default for input events that don't have any characters
Seeing cases where some input events with `inputType=deleteContentBackward` are slipping through. These are probably being created via some mechanism other than a keydown directly on the script (e.g., through some accessibility API, or touch control, or some event that's being targeted elsewhere but propagating to the script accidentally). We _never_ want draft.js to do anything in response to an `onInput` in our user case. We were relying on our passed-in `handleBeforeInput` to always return `handled`; but we're only hitting that logic when the input event contains characters. This will hopefully fix that.
- Loading branch information