disable input "keydown" on smartphones - it's redundant there (no tab key), breaks input editing, and has some impact on performance
fix #138
This commit is contained in:
parent
b97b2fc418
commit
0d51e045a0
30
code/chat.js
30
code/chat.js
@ -606,21 +606,23 @@ window.chat.setupTime = function() {
|
||||
|
||||
|
||||
window.chat.setupPosting = function() {
|
||||
$('#chatinput input').keydown(function(event) {
|
||||
try {
|
||||
var kc = (event.keyCode ? event.keyCode : event.which);
|
||||
if(kc === 13) { // enter
|
||||
chat.postMsg();
|
||||
event.preventDefault();
|
||||
} else if (kc === 9) { // tab
|
||||
event.preventDefault();
|
||||
window.chat.handleTabCompletion();
|
||||
if (!isSmartphone()) {
|
||||
$('#chatinput input').keydown(function(event) {
|
||||
try {
|
||||
var kc = (event.keyCode ? event.keyCode : event.which);
|
||||
if(kc === 13) { // enter
|
||||
chat.postMsg();
|
||||
event.preventDefault();
|
||||
} else if (kc === 9) { // tab
|
||||
event.preventDefault();
|
||||
window.chat.handleTabCompletion();
|
||||
}
|
||||
} catch(error) {
|
||||
console.log(error);
|
||||
debug.printStackTrace();
|
||||
}
|
||||
} catch(error) {
|
||||
console.log(error);
|
||||
debug.printStackTrace();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$('#chatinput').submit(function(event) {
|
||||
event.preventDefault();
|
||||
|
Loading…
x
Reference in New Issue
Block a user