Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to make a new line submits the half-finished form #2525

Open
zznidar opened this issue Jan 25, 2025 · 3 comments
Open

Trying to make a new line submits the half-finished form #2525

zznidar opened this issue Jan 25, 2025 · 3 comments
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working

Comments

@zznidar
Copy link

zznidar commented Jan 25, 2025

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. In the middle of typing an answer, when trying to create a new line, press Shift + Enter

Expected behaviour

A new line should appear in the answer.

Actual behaviour

The form with your half-finished answer is submitted.

Server configuration

Web server: Apache/Nginx

Database: MySQL/Maria/SQLite/PostgreSQL

PHP version: 8.1/8.2/8.3

Nextcloud version: (see Nextcloud admin page)

List of activated apps
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder
Nextcloud configuration
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

Browser

Browser name: Firefox

Browser version: 133.0.3

Operating system: Windows 10

Browser log
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...

Alternatively, I also tryed pressing Enter only before that, but this just moves you to the next question.
Don't get me wrong – I'm all in for keyboard shortcuts, but usually, Shift + Enter is reserved for line breaks, while Ctrl + Enter is the submitting action.

@Chartman123
Copy link
Collaborator

@zznidar Could you please specify which question type had the focus when you experienced that issue? I just tried to reproduce it in a long text answer field (the only field type where new lines are supported) and I was able to add new lines without any problem.

When you hit Shift + Enter in a short text field it triggers the submission. I agree with you, that Ctrl + Enter is really more common here. Let me check if there's a reason, why we don't use this in Forms.

@Chartman123 Chartman123 added bug Something isn't working 0. Needs triage Pending approval or rejection. This issue is pending approval. labels Jan 27, 2025
@zznidar
Copy link
Author

zznidar commented Jan 27, 2025

Yes, that's right, it was probably a short field (just 1 line of height). As I was the end user (not the creator of the form), I can only give the HTML node I see in the browser:

<input data-v-55968bd8="" data-v-fe8c8d56="" aria-label="A short answer for the question “[redacted]”" placeholder="Enter your answer" required="required" dir="auto" maxlength="4096" minlength="1" type="text" class="question__input">

@Chartman123
Copy link
Collaborator

Yes then it's a short text answer field that doesn't support new lines :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants