?
avatar Harshil99
Harshil99
27 Feb 2019

Steps to reproduce the issue

  • Go to Article-New.
  • Fill the required title field.
  • Press 'Enter' in title field only or in other text field like tags, version note.

Expected result

It should do either of these (save , save & close , save & new).

Actual result

Usually pressing 'Enter' should do submit (here save/save & close/save & new) but here it close the new article without saving.

System information (as much as possible)

Joomla! 4.0.0-alpha7-dev
Google Chrome 72.0.3626.119

Additional comments

Similar thing happens in many text input field.

avatar Harshil99 Harshil99 - open - 27 Feb 2019
avatar joomla-cms-bot joomla-cms-bot - change - 27 Feb 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Feb 2019
avatar puneeth2001
puneeth2001 - comment - 27 Feb 2019

issue confirmed

avatar chmst
chmst - comment - 2 Mar 2019

Confirmed. It is at least an unexpected behaviour without any kind of information.

avatar zwiastunsw
zwiastunsw - comment - 2 Mar 2019

Pressing the Enter / Space key in the text fields of the form should not trigger any action. Only in the case of the Enter / Space buttons should trigger an action consistent with the role of the button.
In the case of checklists, radio button, select list, the use of spaces selects / deselects option

avatar franz-wohlkoenig franz-wohlkoenig - change - 3 Mar 2019
Status New Discussion
avatar brianteeman
brianteeman - comment - 3 Mar 2019

@zwiastunsw Thats not correct. Think of the joomla admin login form.

avatar zwiastunsw
zwiastunsw - comment - 4 Mar 2019

Keyboard functionality and predictable consistent behavior are a condition of accessibility.
@brianteeman rightly points out that my brief & quick comment is not correct.

I should only write that the Expected result indicated in the issue description is not correct.

Generally, the Enter key is used to confirm the action. What are the standard default effects of pressing the Enter key?

  • Start a new paragraph in a text editor or word processor
  • Submit a simple form, e.g. search or login (so called implicit submission)
  • Activate a button
  • Execute the link
  • Performing a default action on the selected value (e.g. placing an accepted value to the list)
  • Expand or collapse the dropdown menu, collapsed panel.

Since the forms in Joomla backend are usually complex, assigning to the Enter key action such as "Save", "Save & Close", submit form (implicit submission), would cause a lot of confusion and disorientation, especially for blind users. That's why I wrote that "Pressing the Enter / Space key in the text fields of the form should not trigger any action."

avatar chmst
chmst - comment - 4 Mar 2019

A Space in a text field is a space.
We need a PR which implements "Pressing the Enter key in the text fields of a form should not trigger any action."


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24035.
avatar zwiastunsw
zwiastunsw - comment - 4 Mar 2019

More. We need to investigate whether there are other situations in which we have accidental results of using the Enter key. Of course, using the Enter key in the Search fields should start the search.

avatar brianteeman
brianteeman - comment - 4 Mar 2019

We need a PR which implements "Pressing the Enter key in the text fields of a form should not trigger any action."

Except it should in a search field and that it just a text field :(

avatar chmst
chmst - comment - 4 Mar 2019

Then it is better to make special fields where the enter key can trigger an action. For example in search.

avatar brianteeman
brianteeman - comment - 4 Mar 2019

Reading the following article its about how many fields are in the form

https://www.tjvantoll.com/2013/01/01/enter-should-submit-forms-stop-messing-with-that/

avatar chmst
chmst - comment - 4 Mar 2019

This is interesting.

But the issue here is an issue.
I fill a form and write a long text. Then I want to add a note - and in the note field I accidentally press enter. All input is los, I am back on the list view.
So how can @Harshil99 solve that?

avatar zwiastunsw
zwiastunsw - comment - 4 Mar 2019

Pressing the Enter key in the textarea field must start a new paragraph. Always.

avatar Harshil99
Harshil99 - comment - 5 Mar 2019

@zwiastunsw I think we can't start paragraph in single line fields (i.e. Title field in new article).

avatar zwiastunsw
zwiastunsw - comment - 5 Mar 2019

@Harshil99: You think well, but I wrote about the textarea field, where we have many lines.

avatar chmst
chmst - comment - 5 Mar 2019

The issue here was the text field, for exaple the title field or the notes field

In the article of @brianteeman the user asks for submitting a form when the user presses enter.
I hate this - I use to accidentally submit posts which are not finished, just because I expect that the enter makes a new paragraph and does not send. But this is a personal experience.

In joomla edit forms:

Could we say that pressing enter in a text field may not leave the form without submitting the input?
If we say that the enter key submits the form, what is the default action? Save and Close?

There might be exceptions - the search form, the login form - or others. How can we define these exceptions?

avatar zwiastunsw
zwiastunsw - comment - 5 Mar 2019

Maybe this article will help you:
Implicit Submission of Form When Pressing Enter Key

I am not a programmer. In my opinion it is necessary to find an error. Implicit submission of a form with many fields, this is not the default, correct behavior.

avatar SharkyKZ
SharkyKZ - comment - 8 Mar 2019

Test PR #24123 please.

avatar joomla-cms-bot joomla-cms-bot - change - 8 Mar 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-03-08 07:00:34
Closed_By joomla-cms-bot
avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Mar 2019
Closed_By joomla-cms-bot franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - close - 8 Mar 2019
avatar joomla-cms-bot
joomla-cms-bot - comment - 8 Mar 2019
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Mar 2019

closed as having Pull Request #24123

Add a Comment

Login with GitHub to post a comment