1
0
mirror of https://github.com/hack-chat/main.git synced 2024-03-22 13:20:33 +08:00

Merge pull request #60 from MinusGix/patch-5

Make Ctrl-Tab while typing in textarea exit early
This commit is contained in:
marzavec 2019-04-26 06:19:20 -07:00 committed by GitHub
commit aedd4d46d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -396,6 +396,12 @@ $('#chatinput').onkeydown = function (e) {
updateInputSize();
} else if (e.keyCode == 9 /* TAB */) {
// Tab complete nicknames starting with @
if (e.ctrlKey) {
// Skip autocompletion and tab insertion if user is pressing ctrl
// ctrl-tab is used by browsers to cycle through tabs
return;
}
e.preventDefault();
var pos = e.target.selectionStart || 0;