Deployment saves on typing "s" in a field - but not always

default discord avatar
ps4masterrace
3 months ago
17

I just started using Payload in deployment, rather than just in development. In both Chrome and Safari I run into a rather annoying problem that - sometimes - when I type the "s"-character in a field it is used as shortcut for "Save" in stead of typing it in the field. It seems to be the most appearant when adding an item to a collection using a relationship-field from another collection.



This behaviour is not constant and I haven't noticed it in development. Refreshing the page seems to help.



I setup Payload using

npx create-payload-app


I added some more content, and this problem occors randomly but often. For example: if I'm typing something in a richText-field, the first couple of "s"-es are entered just fine. But after a few words the "s" suddenly behaves as a save-button.



It happens with all my textfields and only in production.



Friendly bump: any ideas what might cause this?



As a last resort: Is it possible to disable saving on typing "s" or "cmd+s" completely?



As the problem seems to occur pretty randomly, it is not possible to work around it. This makes it rather annoying.

  • default discord avatar
    zoul0813
    2 months ago

    Can confirm - I am experiencing the same issue. It seems random, and is awkward as it captures the "s" quietly while typing ... so I wind up with text missing the "s" as well.

  • discord user avatar
    seanzubrickas
    Payload Team
    2 months ago

    woah - this is an interesting one. I'll talk to the team about this and get back to both of you with some answers. Hold tight!



    Alright @ps4masterrace + @zoul0813 this is intentional in our set of current hotkeys, and right now it's not possible to disable it. Something we could do in the future is add the ability to customize or even disable them entirely. That said this would be a future feature, but we can open a github discussion around this and get it on our roadmap.



    Let me know if you need anything else here!

  • default discord avatar
    zoul0813
    2 months ago

    @seanzubrickas Should we open a bug report for the inappropriate key captures? Surely that’s not intentional? It should only trigger the Save when doing Cmd-S, yes?

  • discord user avatar
    seanzubrickas
    Payload Team
    2 months ago

    Yes - that would be helpful! I was updating my comment above just now



    If you could include exact steps to reproduce - we'll get after it!

  • default discord avatar
    zoul0813
    2 months ago

    The steps are, “type an S and it randomly saves” - I’ve been unable to reproduce it consistently

  • discord user avatar
    seanzubrickas
    Payload Team
    2 months ago

    what version of Payload are you on?

  • default discord avatar
    ps4masterrace
    2 months ago

    Hi Sean, thanks for the reply!



    I'm also not able to reproduce it consistently. It happens while editing an entry in the main collection, but also when adding new relationship entry (which is extra annoying, because it closes automatically after saving). I have to save and reload the main entry, go back to the relationship entry and then I'm able to type text including words that contain an S.



    I'm using Payload 1.15, but I think - not completely sure - it was also appearant on an earlier version.

  • discord user avatar
    seanzubrickas
    Payload Team
    2 months ago

    Hmmm very interesting for sure, that behavior is certainly not intentional

  • default discord avatar
    ps4masterrace
    2 months ago

    Hi, any ideas how to fix this? A workaround, rollback to an earlier version would be fine.



    Now the workflow is typing stuff that contains an "s" in a different program and copy pasting it, as it is extremely annoying. Especially when adding new related items (such as an image).

  • discord user avatar
    seanzubrickas
    Payload Team
    2 months ago

    this is on my list to dig into this week and get resolved



    Hello! Are you both on the master branch of the payload repo, or one of our templates?



    Just want to confirm while I get a few other engineers to replicate

  • default discord avatar
    ps4masterrace
    2 months ago

    I started my project with

    npx create-payload-app

    and went on from there

  • discord user avatar
    seanzubrickas
    Payload Team
    2 months ago

    what browsers are you using?



    Update: I think we're on the path to a fix! Stay tuned.

  • default discord avatar
    ps4masterrace
    2 months ago

    I used both Chrome and Safari. The problem appeared in both browsers. Since I upgraded my laptop from an Intel Mac to a Silicon Mac I didn't run into the problem (though I haven't used Payload very much since then yet).



    Good to hear you're on the path to a fix though!

  • discord user avatar
    seanzubrickas
    Payload Team
    2 months ago

    we've got an open PR that should fix this. Will ping both of you when tests have passed and it gets merged.



    Hey everyone! We released a new version that includes a fix for this issue. Check it out and let us know if all works as expected!



    https://github.com/payloadcms/payload/releases/tag/v1.15.7
  • default discord avatar
    fatso8855
    last month

    what timing, this has been bugging me all week!

  • discord user avatar
    seanzubrickas
    Payload Team
    last month

    I believe it!! Sorry this took a bit. 2.0 is coming up quick but I did what I could to speed this fix along. Appreciate your patience!

  • default discord avatar
    ps4masterrace
    last month

    Anyway, it's awesome, thanks! Eventually the issue popped up again before updating prod.

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.