Bug 1335370 - accept Ctrl-Enter in textareas to submit the form
Summary: accept Ctrl-Enter in textareas to submit the form
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: web UI
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 23.0
Assignee: Blake McIvor
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-12 05:53 UTC by Dan Callaghan
Modified: 2016-07-07 23:11 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-07-07 23:11:28 UTC
Embargoed:


Attachments (Terms of Use)

Description Dan Callaghan 2016-05-12 05:53:59 UTC
Some applications have adopted a convention of Ctrl-Enter for submitting forms in multi-line inputs. For example in the JIRA comment modal, Ctrl-Enter submits the comment, and in Gmail compose Ctrl-Enter sends the mail.

We merged a patch to accept Ctrl-Enter in the new comment form <https://gerrit.beaker-project.org/4885> but there are other places in the UI where we could also adopt the same convention.

Ones I can think of so far:

* job/recipe set cancel modal
* recipe set waive modal
* problem report modal
* loan request modal
(or more generally, every modal with a textarea?)
* system notes tab -- but it's not ported to Backbone yet
* job clone -- also not Backbone yet

The advantage of the Ctrl-Enter shortcut is that it lets you quickly submit the form without leaving your keyboard (which you are presumably using to type into the textarea) and also without requiring you to tab down to the submit button, which can be a bit awkward (you have to carefully tab past any other inputs along the way, such as the Cancel button).

Comment 1 Blake McIvor 2016-05-24 05:02:10 UTC
Is a selenium test necessary for this? the other bug fix provided no test. There are quite a few places where this functionality will be added. Which will mean quite a few scattered tests throughout the integration tests that essentially do the same thing?

Comment 2 Dan Callaghan 2016-05-26 21:24:08 UTC
Yeah I should have included a Selenium test in the other patch, that was my bad for being lazy.

I don't think we need to add separate tests to cover every single modal with textarea where we are applying this -- especially if we can just have one single global script that applies itself to any textarea, which I think we can probably do. In that case it would be enough to have a Selenium test just asserting that it works for one of the textareas, we can assume then that it works the same across all the others.

Comment 3 Blake McIvor 2016-06-02 06:47:33 UTC
https://gerrit.beaker-project.org/#/c/4956/

Comment 6 Dan Callaghan 2016-07-07 23:11:28 UTC
Beaker 23.0 has been released.


Note You need to log in before you can comment on or make changes to this bug.