-
Notifications
You must be signed in to change notification settings - Fork 248
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
Detect key events in code tag in domObserver #114
base: master
Are you sure you want to change the base?
Conversation
Are you styling the |
Yup we are wrapping the
|
And the browser only splits the |
Yes it splits into 2 |
Any ideas about this? I can send through the mutations from the domobserver if that helps? |
@marijnh just wanted to bump this |
A minimal self-contained setup that demonstrates the problem would help debug this. The markdown schema also has an inner |
Hey @marijnh I'm necroing this thread only because I work with Sean and have been working on newer problems arising that are fixed by this also. We have an issue where users on Android mobile cannot enter a new line while in a codeblock, and also if there is content after the cursor and the return key is pressed, that content is lost. I've created a reproduction for you to try out here: https://stackblitz.com/edit/js-jb8fcr?file=index.html I tested the PR suggested change locally, and without any other changes was able to resolve both the aforementioned issues :) Hopefully the reproduction helps, let me know if you need anything else. Open to suggestion on resolution, there may be something we've missed in our investigation. We're currently looking at a bump for our |
Hey @marijnh just a gentle bump ❤️ |
At a glance, your code blocks are rendered in an uneditable wrapper element, which is definitely not something this library supports. |
We currently have a
code block
node that under the hood uses acode
tag instead of ap
tag for better syntax highlighting. We were noticing on mobile that if you hit enter within the code block it would delete all the text after the place where the "Enter" was done.I believe this will fix the issue but also not sure if it is the best approach. I don't think on our end we are able to change to a
p
tag now and must stick withcode
.Have attached some videos to help show the issue. This is done on the iOS simulator BTW
after.mov
before.mov