Fixed return key code

canary
WolverinDEV 2019-05-25 21:10:25 +02:00
parent 11bb4ab218
commit 3dc582d1f0
6 changed files with 6 additions and 6 deletions

View File

@ -881,7 +881,7 @@ class LocalClientEntry extends ClientEntry {
_self.renaming = true;
elm.keypress(function (e) {
if(e.keyCode == KeyCode.KEY_ENTER) {
if(e.keyCode == KeyCode.KEY_RETURN) {
$(this).trigger("focusout");
return false;
}

View File

@ -201,7 +201,7 @@ function createInputModal(headMessage: BodyCreator, question: BodyCreator, valid
button_submit.prop("disabled", !valid);
});
input.on('keydown', event => {
if(event.keyCode !== KeyCode.KEY_ENTER || event.shiftKey)
if(event.keyCode !== KeyCode.KEY_RETURN || event.shiftKey)
return;
if(button_submit.prop("disabled"))
return;

View File

@ -373,7 +373,7 @@ class ChatBox {
this._input_message.on('keypress',event => {
if(!event.shiftKey) {
console.log(event.keyCode);
if(event.keyCode == KeyCode.KEY_ENTER) {
if(event.keyCode == KeyCode.KEY_RETURN) {
this.onSend();
return false;
} else if(event.keyCode == KeyCode.KEY_UP || event.keyCode == KeyCode.KEY_DOWN) {

View File

@ -46,7 +46,7 @@ namespace Modals {
flag_resolved_address = input[0].checked;
update_link();
});
input[0].checked = flag_direct_connect;
input[0].checked = flag_resolved_address;
}
update_link();

View File

@ -898,7 +898,7 @@ namespace ui {
});
element.on('keypress', event => {
if(event.which == KeyCode.KEY_ENTER)
if(event.which == KeyCode.KEY_RETURN)
element.trigger('focusout');
const text = String.fromCharCode(event.which);

View File

@ -750,7 +750,7 @@ class ChannelTree {
this.select_next_channel(channel, false);
} else if(this.currently_selected instanceof ServerEntry)
this.onSelect(this.channel_first, true);
} else if(event.keyCode == KeyCode.KEY_ENTER) {
} else if(event.keyCode == KeyCode.KEY_RETURN) {
if(this.currently_selected instanceof ChannelEntry) {
this.currently_selected.joinChannel();
}