codex-team / codex-team/editor.js
[Bug] Input type email errors on selectionEnd
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Adding a custom email input block results in an error because email input doesn't support `selectionEnd` which is used to clear off selection. The error comes from `src/components/modules/caret.ts:57`.
Steps to reproduce:
1. Create a custom input block with type `email`
2. Add that block to the editor instance from the toolbar
3. Get the error
`InvalidStateError: Failed to set the 'selectionEnd' property on 'HTMLInputElement': The input element's type ('email') does not support selection.`
Expected behavior:
The selectionEnd doesn't get called and thus no error is shown
Screenshots:

Device, Browser, OS:
Macbook Pro 16" 2019 2,6GHz i7
MacOS Big Sur version 11.6
Chrome version 96.0
Editor.js version:
2.22.2
Plugins you use with their versions:
@editorjs/paragraph
@editorjs/list
@editorjs/header
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.