diff options
author | friendica <info@friendica.com> | 2014-02-01 20:08:36 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-02-01 20:08:36 -0800 |
commit | 255190205bf35bc1f3f9a90e6e8d5bfa2582b686 (patch) | |
tree | 42a45060be835d2533a669dde66fbb7017915bfb /view/tpl | |
parent | 2c75210fdbb316d13ad27950b14302266fff9a8e (diff) | |
parent | 3b1346c143fef300cbf0bec38333b0b772a01ceb (diff) | |
download | volse-hubzilla-255190205bf35bc1f3f9a90e6e8d5bfa2582b686.tar.gz volse-hubzilla-255190205bf35bc1f3f9a90e6e8d5bfa2582b686.tar.bz2 volse-hubzilla-255190205bf35bc1f3f9a90e6e8d5bfa2582b686.zip |
Merge https://github.com/friendica/red into zpull
Diffstat (limited to 'view/tpl')
-rw-r--r-- | view/tpl/chat.tpl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/view/tpl/chat.tpl b/view/tpl/chat.tpl index 0ebe879a1..a0c18f8d6 100644 --- a/view/tpl/chat.tpl +++ b/view/tpl/chat.tpl @@ -89,3 +89,20 @@ function update_chats(chats) { } </script> +<script> +function isMobile() { + try{ document.createEvent("TouchEvent"); return true; } + catch(e){ return false; } +} +$(function(){ + + $('#chatText').keypress(function(e){ + if (e.keyCode == 13 && e.shiftKey||isMobile()) { + } + else if (e.keyCode == 13) { + e.preventDefault(); + $(this).parent('form').trigger('submit'); + } + }); +}); +</script> |