Open mikestopcontinues opened 3 years ago
Hi @mikestopcontinues, I was unable to reproduce this using your example (the cursor doesn't jump for me).
Also, this doesn't happen with any of the blocks in https://cms-demo.netlify.com/#/collections/posts/new.
Perhaps share a public repo and a video/gif showing the issue?
Hi @erezrokah Here's a reproduction. Sorry I didn't lead with one. In my own experimentation, it's only the text
field. The others aren't giving me a problem.
https://codepen.io/mikestopcontinues/pen/PobXQxO
And here's the goal state, which does some parsing to/from markdown. The issue is the same. Including it just for context.
I'm also experiencing cursor jumping to the end of text fields that are inside a component in markdown.
I'm using: netlify-cms-app@^2.14.26 Chrome 89.0.4389.82 OS: Windows
App recently started experiencing this behaviour, any updates on the issue?
netlify-cms-app@^2.15.72 OS: macOS Monterey Chrome Version 105.0.5195.102 (Official Build) (arm64)
For what it's worth it is not happening in Safari.
I can confirm @josephmasongsong report that this bug is active again.
netlify-cms@2.10.192 OS: macOS Monterey Chrome: Version 105.0.5195.102 (Official Build) (arm64)
Firefox (104.0.2 (64-bit)) does not have the issue.
My team is seeing this bug as well. I was not seeing it, and then I updated to Chrome Version 105.0.5195.102, and then I was seeing it. Looks like it has something to do with the newest version of Chrome
I'm getting this too, starting from when I upgraded to Chrome 105.0.5195.102 (Official Build) (x86_64).
netlify-cms-app 2.15.72 netlify-cms-core 2.55.2 netlify-cms 2.10.192
https://user-images.githubusercontent.com/5812027/189841849-4b872744-57cf-4429-b142-0bad1f96bcd6.mov
Friendly bump on this issue, our content team started experiencing this issue after upgrading to Chrome 105.
Update from our team. It looks like removing this line will fix the issue.
Video attached
https://user-images.githubusercontent.com/792088/190082126-d13eb60b-023b-45ca-9f8a-6365119e0eb9.mp4
Update from our team. It looks like removing this line will fix the issue.
Video attached
Sep-14-2022.02-44-52.mp4
yes but can I remove it globally?
I think the proper fix for now is
[data-slate-editor] {
-webkit-user-modify: read-write !important;
}
I think the proper fix for now is
[data-slate-editor] { -webkit-user-modify: read-write !important; }
Thanks, I'll try it but hello Netlify, it's been 3 years since bug exists
@h1sashin I wouldn't count on netlify providing anything cms related. They basically stopped developing it.
I've just struck the same bug and landed here on my research.
Same here on Brave 1.43.89 Chromium: 105.0.5195.102. Makes any kind of back-editing practically impossible without the fix provided by @johnxie and/or @aledovskikh
Any plan on fixing this? is there a PR already?
I posted the same issue over here #6557
How do you apply the fix as I can't work that out? I am using netlify CMS with an 11ty site.
How do you apply the fix as I can't work that out? I am using netlify CMS with an 11ty site.
@sawilde Add the following code in the header of the index.html
file where the Netlify CMS JavaScript is loaded. That works for me:
<style>
[data-slate-editor] {
-webkit-user-modify: read-write !important;
}
</style>
@marcojakob thank you very much
I think the proper fix for now is
[data-slate-editor] { -webkit-user-modify: read-write !important; }
Hi, I am using netlify CMS with gatsby js, and am confused how to apply this fix, can someone help me
@amantulsyan35 I don't know how the gatsby setup works but in my setup I had an admin section with an index.html file that loads the Netlify CMS script, I added it in there as described by @marcojakob
I think the proper fix for now is
[data-slate-editor] { -webkit-user-modify: read-write !important; }
Hi, I am using netlify CMS with gatsby js, and am confused how to apply this fix, can someone help me @amantulsyan35
I used this solution for Gatsby.
https://answers.netlify.com/t/change-admin-css-to-tweak-a-bit-the-cms-ui-defaults/17835
Experiencing this on our end as well, occurring in the markdown
widget. Applying the style fix noted here fixes it for us.
Using Chrome Version 107.0.5304.87 (Official Build) (arm64)
This solution doesn't work for me, when I need to write with dead keys (pt-BR with accent marks, and what not)
Outlook for Androidhttps://aka.ms/AAb9ysgを取得
From: Jason Karlavige @.>
Sent: Tuesday, November 8, 2022 6:41:02 PM
To: netlify/netlify-cms @.>
Cc: Vinícius Hoyer @.>; Manual @.>
Subject: Re: [netlify/netlify-cms] Cursor jumps to end of editorComponent text
field in v2.10.97 (#5092)
Experiencing this on our end as well, occurring in the markdown widget. Applying the style fix noted here fixes it for us.
Using Chrome Version 107.0.5304.87 (Official Build) (arm64)
― Reply to this email directly, view it on GitHubhttps://github.com/netlify/netlify-cms/issues/5092#issuecomment-1307864982, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACUDBAADA335HUCQRKRD433WHLCG5ANCNFSM4Y7XZBEA. You are receiving this because you are subscribed to this thread.Message ID: @.***>
The solution works, just don't forget to import the cms-utils.js into your cms.js file
Is this issue fixed now? Is the style fix not needed anymore?
Still happening on chrome on Windows and MacOS. Adding the snippet to the header fixed it for me using the Next.js template referenced in the docs.
Still an issue when using CDN version of CMS
I'm still encountering this issue, and the above fix didn't work for me. I'm using a list widget as an editor component, and I have two text areas in each list item that are having this problem - a code widget, and a text widget. The string widget is working fine and doesn't jump the cursor to the end.
For the code
widget, I was able to get the right behavior by using this CSS snippet in admin/index.html
instead (notice the change in selector to textarea
:
<style>
/* Workaround for text editor https://github.com/decaporg/decap-cms/issues/5092 */
textarea {
-webkit-user-modify: read-write !important;
}
</style>
However, I'm still having this problem with the text widget, and the original suggestion to use the [data-slate-editor]
selector isn't working for me. Maybe there's something with how the list widget updates child items that doesn't work with this workaround for the text widget? If anyone has any leads on a fix for this situation, I'd appreciate it.
This appears to be caused by https://github.com/ianstormtaylor/slate/issues/5110 so the fix is likely upgrading the version of slate used by the netlify-cms-widget-markdown package. It's likely worth updating the recommended index.html
with the workaround if upgrading slate isn't in the cards near term as this is a near universal issue at this point.
Happy to PR the workaround into the various docs, not sure I have the bandwidth to update Slate from 0.47 to 0.94 but if that's on the team's radar it's probably the better fix
I think the proper fix for now is
[data-slate-editor] { -webkit-user-modify: read-write !important; }
But here it is said that it is a non-standard feature and shouldn't be used for production sites.
@ali4zimi since this is only a css rule, I don't see why it wouldn't be used on production sites. I think it's safe.
This appears to be caused by ianstormtaylor/slate#5110 so the fix is likely upgrading the version of slate used by the netlify-cms-widget-markdown package. It's likely worth updating the recommended
index.html
with the workaround if upgrading slate isn't in the cards near term as this is a near universal issue at this point.Happy to PR the workaround into the various docs, not sure I have the bandwidth to update Slate from 0.47 to 0.94 but if that's on the team's radar it's probably the better fix
wait, what is the workaround? (because the css doesn't work with dead keys which is important for writing in portuguese and other languages as well)
The workaround is the CSS change. It's not a fix but right now no one who freshly deploys according the documentation can use the markdown editor, in any language.
The correct fix is to update the library or make a new markdown control using a different library. I don't have the bandwidth to do that but @vhoyer given it's blocking you you might consider investigating that. Worth reviewing https://github.com/decaporg/decap-cms/issues/5795 as it looks like there is some discussion about versions and switching editors there
For Gatsby: (using gatsby-plugin-netlify-cms
)
gatsby-config.js
: {
resolve: 'gatsby-plugin-netlify-cms',
options: {
modulePath: `${__dirname}/src/cms/cms.js`
}
}
modulePath
prop above and add this in the cms/cms.js
file:
const injectCustomStyle = () => {
const style = document.createElement('style');
style.innerHTML = `
div[data-slate-editor] {
-webkit-user-modify: read-write !important;
}
`;
document.head.appendChild(style);
};
injectCustomStyle();
**For others using `index.html` that loads the Netlify CMS script, this is very helpful: https://github.com/decaporg/decap-cms/issues/5092#issuecomment-1257138396**
Describe the bug
It looks like bugs #4539 and #3578 have returned.
To Reproduce
Expected behavior
I expect the cursor to hold its position.
Applicable Versions: