mirror of
https://github.com/discourse/discourse.git
synced 2025-02-05 19:11:13 +00: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 loadingSlider;
|
||||||
@service capabilities;
|
@service capabilities;
|
||||||
@service appEvents;
|
@service appEvents;
|
||||||
|
@service site;
|
||||||
|
|
||||||
@tracked textarea;
|
@tracked textarea;
|
||||||
@tracked scrollable;
|
@tracked scrollable;
|
||||||
@ -48,7 +49,10 @@ 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;
|
||||||
this.focus({ refreshHeight: true, ensureAtEnd: true });
|
|
||||||
|
if (this.site.desktopView) {
|
||||||
|
this.focus({ refreshHeight: true, ensureAtEnd: true });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
@ -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,7 +44,10 @@ 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;
|
||||||
this.focus({ refreshHeight: true, ensureAtEnd: true });
|
|
||||||
|
if (this.site.desktopView) {
|
||||||
|
this.focus({ refreshHeight: true, ensureAtEnd: true });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
Loading…
x
Reference in New Issue
Block a user