mirror of
https://github.com/discourse/discourse.git
synced 2025-03-31 00:35:58 +08:00
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 capabilities;
|
||||
@service appEvents;
|
||||
@service site;
|
||||
|
||||
@tracked textarea;
|
||||
@tracked scrollable;
|
||||
@ -48,7 +49,10 @@ export default class ChatChannelComposer extends Service {
|
||||
this.chat.activeMessage = null;
|
||||
message.editing = true;
|
||||
message.channel.draft = message;
|
||||
this.focus({ refreshHeight: true, ensureAtEnd: true });
|
||||
|
||||
if (this.site.desktopView) {
|
||||
this.focus({ refreshHeight: true, ensureAtEnd: true });
|
||||
}
|
||||
}
|
||||
|
||||
@action
|
||||
|
@ -8,6 +8,7 @@ export default class ChatThreadComposer extends Service {
|
||||
@service chat;
|
||||
@service capabilities;
|
||||
@service appEvents;
|
||||
@service site;
|
||||
|
||||
@tracked textarea;
|
||||
@tracked scrollable;
|
||||
@ -43,7 +44,10 @@ export default class ChatThreadComposer extends Service {
|
||||
this.chat.activeMessage = null;
|
||||
message.editing = true;
|
||||
message.thread.draft = message;
|
||||
this.focus({ refreshHeight: true, ensureAtEnd: true });
|
||||
|
||||
if (this.site.desktopView) {
|
||||
this.focus({ refreshHeight: true, ensureAtEnd: true });
|
||||
}
|
||||
}
|
||||
|
||||
@action
|
||||
|
Loading…
x
Reference in New Issue
Block a user