FIX: more consistent composer focus and replying indicator (#22443)
This commit is contained in:
parent
2ce9364c08
commit
972e0f74ff
|
@ -132,6 +132,8 @@ export default class ChatLivePane extends Component {
|
|||
this.resetComposerMessage();
|
||||
}
|
||||
|
||||
this.composer.focus();
|
||||
|
||||
this.loadMessages();
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
{{on "focusin" (fn this.computeIsFocused true)}}
|
||||
{{on "focusout" (fn this.computeIsFocused false)}}
|
||||
{{did-insert this.setupAutocomplete}}
|
||||
{{did-insert this.composer.focus}}
|
||||
data-chat-composer-context={{this.context}}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -44,10 +44,6 @@ export default class ChatComposer extends Component {
|
|||
@tracked inProgressUploadsCount = 0;
|
||||
@tracked presenceChannelName;
|
||||
|
||||
get shouldRenderReplyingIndicator() {
|
||||
return this.args.channel;
|
||||
}
|
||||
|
||||
get shouldRenderMessageDetails() {
|
||||
return (
|
||||
this.currentMessage?.editing ||
|
||||
|
|
|
@ -45,6 +45,7 @@ export default class ChatThreadPanel extends Component {
|
|||
@action
|
||||
didUpdateThread() {
|
||||
this.subscribeToUpdates();
|
||||
this.chatThreadComposer.focus();
|
||||
this.loadMessages();
|
||||
this.resetComposerMessage();
|
||||
}
|
||||
|
|
|
@ -14,6 +14,10 @@ export default class ChatComposerChannel extends ChatComposer {
|
|||
|
||||
composerId = "channel-composer";
|
||||
|
||||
get shouldRenderReplyingIndicator() {
|
||||
return this.args.channel;
|
||||
}
|
||||
|
||||
get presenceChannelName() {
|
||||
const channel = this.args.channel;
|
||||
return `/chat-reply/${channel.id}`;
|
||||
|
|
|
@ -18,6 +18,10 @@ export default class ChatComposerThread extends ChatComposer {
|
|||
this.composer.reset(this.args.thread);
|
||||
}
|
||||
|
||||
get shouldRenderReplyingIndicator() {
|
||||
return this.args.thread;
|
||||
}
|
||||
|
||||
get disabled() {
|
||||
return (
|
||||
!this.chat.userCanInteractWithChat ||
|
||||
|
|
|
@ -15,7 +15,7 @@ export default class ChatChannelComposer extends Service {
|
|||
|
||||
@action
|
||||
focus(options = {}) {
|
||||
this.textarea.focus(options);
|
||||
this.textarea?.focus(options);
|
||||
}
|
||||
|
||||
@action
|
||||
|
|
Loading…
Reference in New Issue