Cannot Disable Textarea Default Button

This forum allows users to post and respond to "How Do I Do ....." questions. The information contained in this forum has not been validated by K-Rise Systems and, as such, K-Rise Systems cannot guarantee the accuracy of the information.
Post Reply
JefferyD
Posts: 177
Joined: August 31st, 2021, 11:37 am
Contact:

Cannot Disable Textarea Default Button

Unread post by JefferyD »

I set a textbox to be a textarea and am trying to allow newlines when typing. No matter what I do though, the "onkeydown" attribute is still tied to the default button functionality preventing newlines from being added and instead clicking the first button found. I have tried "Shift + Enter" and "Alt + Enter", but they both function just like "Enter".

Is there a way to reinstate the default newline behavior of the "Enter" key for textareas?
image.png
Last edited by JefferyD on March 30th, 2023, 1:02 pm, edited 1 time in total. word count: 76

Tags:
SteveCap
Posts: 327
Joined: August 26th, 2021, 9:18 am
Contact:

Re: Cannot Disable Textarea Default Button

Unread post by SteveCap »

Task #10735 has been created. This post will be updated when it has been completed.
word count: 15
CathyC
Posts: 469
Joined: November 16th, 2021, 11:15 am
Contact:

Re: Cannot Disable Textarea Default Button

Unread post by CathyC »

I tested this and it was working for me, but as soon as I set the textbox's default button I could no longer use enter for new lines in the text area. To use them for new lines, you should be able to just clear that out. Does that fix the issue?
word count: 53
JefferyD
Posts: 177
Joined: August 31st, 2021, 11:37 am
Contact:

Re: Cannot Disable Textarea Default Button

Unread post by JefferyD »

The problem was that new lines were not allowed via the "Enter" key even if a default button was not set. I just tested myself and that seems to no longer be the case though. The current behavior I found I think is appropriate:

Enter
No default button: adds a new line
Default button set: clicks the button

Shift + Enter
Always adds a new line

I'll mark as resolved.
word count: 70
Post Reply