https://github.com/tomashubelbauer/contenteditable-focus
Researching a contenteditable focus issue
https://github.com/tomashubelbauer/contenteditable-focus
contenteditable focus
Last synced: 5 months ago
JSON representation
Researching a contenteditable focus issue
- Host: GitHub
- URL: https://github.com/tomashubelbauer/contenteditable-focus
- Owner: TomasHubelbauer
- Created: 2020-07-10T08:52:23.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2022-04-14T19:53:28.000Z (about 4 years ago)
- Last Synced: 2025-06-01T16:42:41.747Z (about 1 year ago)
- Topics: contenteditable, focus
- Language: HTML
- Homepage: https://tomashubelbauer.github.io/contenteditable-focus
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# `contenteditable` Focus
I'm having some problems with `contenteditable` divs and moving focus among them
where the divs are also wrapped in HTML custom elements (which might play a role
or not) and upon moving the focus the caret is lost and the div is not focused
but the element itself seems to be.
This is supposed to repro this behavior so I can isolate it and fix it, but so
far I've not been able to reproduce.
The workaround I found is to click away from the first content editable div to
an area which is not editable and then focus the next div, with this flow, the
focus works as expected.