Commit ce6257fb0a6270cda9eeef681806e5547a82ef3a
Allow using enter key in text fields in messages
namely, creating a issue or pull-request Fix %GXvH3rvSoeDpxwL/TyCZLhsuPxIqnlBnYUwmmyGzaqs=.sha256cel committed on 11/15/2016, 5:24:16 AM
Parent: da116a36a6e34b4499633c0a896b9bf32d263383
Files changed
modules_basic/message.js | changed |
modules_basic/message.js | ||
---|---|---|
@@ -78,8 +78,13 @@ | ||
78 | 78 … | backlinks, |
79 | 79 … | {onkeydown: function (ev) { |
80 | 80 … | //on enter, hit first meta. |
81 | 81 … | if(ev.keyCode == 13) { |
82 … | + | |
83 … | + // unless in an input | |
84 … | + if (ev.target.nodeName === 'INPUT' | |
85 … | + || ev.target.nodeName === 'TEXTAREA') return | |
86 … | + | |
82 | 87 … | msg.querySelector('.enter').click() |
83 | 88 … | } |
84 | 89 … | }} |
85 | 90 … | ) |
Built with git-ssb-web