Bug 1335370

Summary: accept Ctrl-Enter in textareas to submit the form
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: web UIAssignee: Blake McIvor <bmcivor>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: bmcivor, dcallagh, dowang, ebaak, mjia, rjoost
Target Milestone: 23.0Keywords: FutureFeature, Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-07 23:11:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.