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:
commit
aedd4d46d0
|
@ -396,6 +396,12 @@ $('#chatinput').onkeydown = function (e) {
|
||||||
updateInputSize();
|
updateInputSize();
|
||||||
} else if (e.keyCode == 9 /* TAB */) {
|
} else if (e.keyCode == 9 /* TAB */) {
|
||||||
// Tab complete nicknames starting with @
|
// 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();
|
e.preventDefault();
|
||||||
|
|
||||||
var pos = e.target.selectionStart || 0;
|
var pos = e.target.selectionStart || 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user