Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow override of onInput handler in edit mode #32

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

srubin
Copy link

@srubin srubin commented Mar 15, 2024

We are fully controlling the draft.js component, and we never want the default onInput to be used. That implies that there's a bug in our decorators that allowed a contenteditable change that did not go through our onBeforeInput handler. By allowing us to override onInput, we'll be able to (a) recover from the bug by calling editor.restoreEditorDOM() and also (b) log more details about how this was happening in the first place (e.g., the event's inputType) so we can eventually fix the bug.

@srubin srubin self-assigned this Mar 15, 2024
@srubin srubin changed the title All override of onInput handler in edit mode Allow override of onInput handler in edit mode Mar 16, 2024
@srubin srubin requested a review from anjoola March 16, 2024 19:17
@srubin srubin marked this pull request as ready for review March 16, 2024 19:17
@srubin srubin merged commit a6fc584 into main-pojo Mar 18, 2024
3 checks passed
@srubin srubin deleted the steve/on-input-override branch March 18, 2024 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants