-
-
djblets/media/js/jquery.gravy.js (Diff revision 1) I don't think you need to keep custom state like this. Instead, in keypress, you should be able to just check e.ctrlKey. So, keeping what we had, but having a case statement for the S key, and checking for ctrl. Or did you try that and it didn't work?
-
djblets/media/js/jquery.gravy.js (Diff revision 1) I think all these key codes are provided by jquery.ui. $.ui.keyCode.CONTROL, for instance.
-
-
djblets/media/js/jquery.gravy.js (Diff revision 1) No space in the parens. Actually, no need for this statement. return false should do it.
Support "ctrl-s" shortcut to save text.
Review Request #2394 — Created June 10, 2011 and submitted
Information | |
---|---|
hongbin | |
Djblets | |
1958 | |
Reviewers | |
djblets | |
Support "ctrl-s" shortcut to save text. * Support "ctrl-s" to save pending input text in review description, comments, etc.
Manually tested with IE, Firefox, Chrome, Safari and Opera and unit test.
HO
Change Summary:
Thanks Christian. Here is the fix. Worked in 5 main browsers.
Diff: |
Revision 2 (+22 -6) |
---|
-
-
djblets/media/js/jquery.gravy.js (Diff revision 2) I think this should be keypress again. Does that work, or is there a reason it'll fail?
HO
Change Summary:
Changed according to Christian's advices.
Description: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
||||||||||||
Bugs: |
|
||||||||||||
Diff: |
Revision 3 (+27 -4) |
||||||||||||
Added Files: |