shift+enter for a newline, enter for submission. inversion of current implementation.
This commit is contained in:
parent
78a50756c6
commit
7b4da22617
2 changed files with 8 additions and 4 deletions
|
|
@ -17,8 +17,10 @@ var Stream = {
|
||||||
|
|
||||||
// comment submit action
|
// comment submit action
|
||||||
$stream.delegate("textarea.comment_box", "keydown", function(e){
|
$stream.delegate("textarea.comment_box", "keydown", function(e){
|
||||||
if (e.shiftKey && e.keyCode === 13) {
|
if (e.keyCode === 13) {
|
||||||
$(this).closest("form").submit();
|
if(!e.shiftKey) {
|
||||||
|
$(this).closest("form").submit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -128,8 +128,10 @@ var View = {
|
||||||
|
|
||||||
publisher: {
|
publisher: {
|
||||||
keydown: function(e) {
|
keydown: function(e) {
|
||||||
if(e.shiftKey && e.keyCode === 13) {
|
if(e.keyCode === 13) {
|
||||||
$(this).closest("form").submit();
|
if(!e.shiftKey) {
|
||||||
|
$(this).closest("form").submit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selector: "#publisher textarea"
|
selector: "#publisher textarea"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue