Add group categories default action is page submit, not add

Bug #609167 reported by Andrew Nicols on 2010-07-23
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Jono Mingard

Bug Description

On /admin/groups/groupcategories.php, trying to add a new group category and hitting return (instead of specifically selecting the Add button) submits the form, refreshing the page rather than the expected action of adding the group.

Andrew Nicols (dobedobedoh) wrote :

For firefox this can be fixed by changing the save button from a button to a submit, but this doesn't seem to be a suitable fix for google chrome. Chrome seems to default to the first submit button when you return.

Changed in mahara:
importance: Undecided → Low
status: New → Triaged
milestone: none → 1.3.0
Changed in mahara:
milestone: 1.3.0 → none
tags: added: groups
removed: group
Robert Lyon (robertl-9) wrote :

The reason for this may be due to the fact that the 'Add categories' form is totally javascript driven. Why it was designed this way 3 years ago I have no idea.

Should it be made in the mold of other forms in the system - probably not as it is a very minor form used only by admins.

Probably worth closing this as "won't fix" - will chat with team first

I see a different behavior: When I create a new category and hit the "Enter" key, the first category goes into edit mode. That is very weird as you would expect that you would actually fulfill the action of adding the category that you editing. It looks similar to the form at /admin/site/menu.php

Aaron Wells (u-aaronw) wrote :

I see basically what Kristina described:

1. If you have no group categories yet, and you fill in a name and hit "Enter", then it refreshes the page without creating the new group
2. If you have at least one group category extant, and you fill in a name for a new one and hit "Enter", then it turns one of your existing group categories into edit mode.

It is strange this is an all-Javascript page. Perhaps it was a first step towards JS-ifying more of our list pages, which is a usability suggestion that has been made before. But it was done in a way that doesn't properly handle the "Enter" button.

Jono Mingard (mingard) on 2014-02-25
Changed in mahara:
assignee: nobody → Jono Mingard (mingard)
Jono Mingard (mingard) wrote :

It's quite easy to do, so this might as well be fixed - would be good for accessibility as well.

Changed in mahara:
status: Triaged → In Progress

Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit bacadf12db0ea062dab8aa7fee193f6591e6b316
Author: Jono Mingard <email address hidden>
Date: Wed Feb 26 12:34:50 2014 +1300

Submit current form when pressing Enter in Group categories (Bug #609167)

Pressing enter in the input used to add/edit a category now causes the
relevant 'Add' or 'Update' button to be activated

Change-Id: Ia0157cdc65d03cb184d8afdb3f597b5ba81e262e
Signed-off-by: Jono Mingard <email address hidden>

Robert Lyon (robertl-9) on 2014-03-04
Changed in mahara:
status: In Progress → Fix Committed
milestone: none → 1.9.0
Robert Lyon (robertl-9) on 2014-04-22
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers