We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36926
    • 701 Posts
    Hi,

    Is there a way when you have a textarea in a update window/overlay for a CMP is there a way to not save when the return key is pressed. Very annoying. I've just check a couple of other CMP (gallery,doodles) and all seem to suffer from this problem, it actually makes the textarea useless as you can only ever enter in a single line.

    Problem is in chrome/safari/FF - not checked IE

    Any suggestions?

    Ben [ed. note: bennyb last edited this post 14 years, 4 months ago.]
      • 33968
      • 863 Posts
      I've encountered this too.

      A quick solution is simply to add the following to your window config:
      ,keys: null
      

      That disables all key press events in your window, including the textarea.

      A better solution would be to check if the key press is occurring specifically when a textarea is focused (on keydown/keyup) and only disable 'enter' in that case, allowing you to still use enter to submit the form outside of the textarea.
        • 36926
        • 701 Posts
        Thanks Lucas, i'll give this ago.

        Ben