FIX: do not autofocus input on edit in mobile (#26554)
This commit is contained in:
parent
32e0a0a0d3
commit
0bee802ccc
|
@ -13,6 +13,7 @@ export default class ChatChannelComposer extends Service {
|
||||||
@service loadingSlider;
|
@service loadingSlider;
|
||||||
@service capabilities;
|
@service capabilities;
|
||||||
@service appEvents;
|
@service appEvents;
|
||||||
|
@service site;
|
||||||
|
|
||||||
@tracked textarea;
|
@tracked textarea;
|
||||||
@tracked scrollable;
|
@tracked scrollable;
|
||||||
|
@ -48,8 +49,11 @@ export default class ChatChannelComposer extends Service {
|
||||||
this.chat.activeMessage = null;
|
this.chat.activeMessage = null;
|
||||||
message.editing = true;
|
message.editing = true;
|
||||||
message.channel.draft = message;
|
message.channel.draft = message;
|
||||||
|
|
||||||
|
if (this.site.desktopView) {
|
||||||
this.focus({ refreshHeight: true, ensureAtEnd: true });
|
this.focus({ refreshHeight: true, ensureAtEnd: true });
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
async replyTo(message) {
|
async replyTo(message) {
|
||||||
|
|
|
@ -8,6 +8,7 @@ export default class ChatThreadComposer extends Service {
|
||||||
@service chat;
|
@service chat;
|
||||||
@service capabilities;
|
@service capabilities;
|
||||||
@service appEvents;
|
@service appEvents;
|
||||||
|
@service site;
|
||||||
|
|
||||||
@tracked textarea;
|
@tracked textarea;
|
||||||
@tracked scrollable;
|
@tracked scrollable;
|
||||||
|
@ -43,8 +44,11 @@ export default class ChatThreadComposer extends Service {
|
||||||
this.chat.activeMessage = null;
|
this.chat.activeMessage = null;
|
||||||
message.editing = true;
|
message.editing = true;
|
||||||
message.thread.draft = message;
|
message.thread.draft = message;
|
||||||
|
|
||||||
|
if (this.site.desktopView) {
|
||||||
this.focus({ refreshHeight: true, ensureAtEnd: true });
|
this.focus({ refreshHeight: true, ensureAtEnd: true });
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
replyTo() {
|
replyTo() {
|
||||||
|
|
Loading…
Reference in New Issue