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?
Cannot Disable Textarea Default Button
-
- Posts: 178
- Joined: August 31st, 2021, 11:37 am
- Contact:
Cannot Disable Textarea Default Button
Last edited by JefferyD on March 30th, 2023, 1:02 pm, edited 1 time in total. word count: 76
Tags:
-
- Posts: 329
- Joined: August 26th, 2021, 9:18 am
- Contact:
Re: Cannot Disable Textarea Default Button
Task #10735 has been created. This post will be updated when it has been completed.
word count: 15
-
- Posts: 472
- Joined: November 16th, 2021, 11:15 am
- Contact:
Re: Cannot Disable Textarea Default Button
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
-
- Posts: 178
- Joined: August 31st, 2021, 11:37 am
- Contact:
Re: Cannot Disable Textarea Default Button
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.
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