Fixed return key code
parent
11bb4ab218
commit
3dc582d1f0
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue