Cms.js not being used for gatsby and netlify-cms admin

Hi all
So all my gatsby sites are plagued by the dreaded “cursor jumps to the end of the paragraph” bug that is in Chrome and Firefox browsers. The fix was to add an admin.css file to static/admin and include this line:

[data-slate-editor] {
    -webkit-user-modify: read-write !important;

I have tested it in the chrome inspector for that element and it works.
So, I followed the instructions for gatsby dynamically adding the admin.css to the header in the cms-utils.js file like so:

if (typeof window !== "undefined") {
    // add admin.css
    const link = document.createElement("link");
    link.type = "text/css";
    link.rel = "stylesheet";
    link.href = "/admin/admin.css";

    if (process.env.NETLIFY_SITE_URL) {

then imported into the cms.js file :

import "./cms-utils";

import CMS from "netlify-cms-app";

I push everything up to github, it builds fine. I can login fine. Only problem is the cms.js is not being used at all. I even commented out all the code and pushed…nothing. Admin still loads and the cursor still jumps to the end.

here is the site for admins:

thanks for the help!

This sounds like a custom-code issue… I wonder how this ties to Netlify being the problem?

many people have had this issue related to the text editor in the netlify-cms admin panel. you can check this thread here:

after clearing my chrome cache and redeploying this solution works.

glad to hear it. Thanks for coming back and sharing your solution with the community. (: