Allow COMMAND+ENTER to save and close the commentDialogView
Review Request #8162 — Created May 13, 2016 and submitted
Allowing COMMAND+ENTER to close the commentDialogView widget is more natural to Mac users and is a solution used by many sites for immediate submission. Saves tabbing to the button too.
- Command-Enter will save the comment dialog.
- Added unit test.
Description | From | Last Updated |
---|---|---|
The code here isn't handling Alt-I, despite the comment, but see my next comment anyway. |
chipx86 | |
This should be part of the logic in _onTextKeyPress, which is where the control-enter is handled. |
chipx86 | |
Indentation should be 4 spaces. |
brennie | |
Can you change this to e.preventDefault(); e.stopPropagation(); ? |
brennie | |
"Enter" |
chipx86 | |
This kind of trails off. |
chipx86 | |
"minimize." Should include the period at the end (same with other comments). |
chipx86 | |
We're in total control of this and everything that calls it, so the !! doesn't add anything useful. |
david | |
Missing period. ``metaKey`` |
brennie | |
Same here. |
brennie |
-
Submitting to gauge interest. COMMAND+ENTER is a popular philosophy for insta-save on Macs. Review Board uses CONTROL+ENTER which is popular on Windows but not Mac.
- Change Summary:
-
I've made a few more modifications to allow META key handling for all shortcuts. Let me know what you think of this. Thank you!
-
Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/views/tests/commentDialogViewTests.js reviewboard/static/rb/js/views/commentDialogView.js Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/views/tests/commentDialogViewTests.js reviewboard/static/rb/js/views/commentDialogView.js
-
Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/views/tests/commentDialogViewTests.js reviewboard/static/rb/js/views/commentDialogView.js Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/views/tests/commentDialogViewTests.js reviewboard/static/rb/js/views/commentDialogView.js
-
Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/views/tests/commentDialogViewTests.js reviewboard/static/rb/js/views/commentDialogView.js Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/views/tests/commentDialogViewTests.js reviewboard/static/rb/js/views/commentDialogView.js
-
Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/views/tests/commentDialogViewTests.js reviewboard/static/rb/js/views/commentDialogView.js Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/views/tests/commentDialogViewTests.js reviewboard/static/rb/js/views/commentDialogView.js