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.resetComposerMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.composer.focus();
|
||||||
|
|
||||||
this.loadMessages();
|
this.loadMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,6 @@
|
||||||
{{on "focusin" (fn this.computeIsFocused true)}}
|
{{on "focusin" (fn this.computeIsFocused true)}}
|
||||||
{{on "focusout" (fn this.computeIsFocused false)}}
|
{{on "focusout" (fn this.computeIsFocused false)}}
|
||||||
{{did-insert this.setupAutocomplete}}
|
{{did-insert this.setupAutocomplete}}
|
||||||
{{did-insert this.composer.focus}}
|
|
||||||
data-chat-composer-context={{this.context}}
|
data-chat-composer-context={{this.context}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -44,10 +44,6 @@ export default class ChatComposer extends Component {
|
||||||
@tracked inProgressUploadsCount = 0;
|
@tracked inProgressUploadsCount = 0;
|
||||||
@tracked presenceChannelName;
|
@tracked presenceChannelName;
|
||||||
|
|
||||||
get shouldRenderReplyingIndicator() {
|
|
||||||
return this.args.channel;
|
|
||||||
}
|
|
||||||
|
|
||||||
get shouldRenderMessageDetails() {
|
get shouldRenderMessageDetails() {
|
||||||
return (
|
return (
|
||||||
this.currentMessage?.editing ||
|
this.currentMessage?.editing ||
|
||||||
|
|
|
@ -45,6 +45,7 @@ export default class ChatThreadPanel extends Component {
|
||||||
@action
|
@action
|
||||||
didUpdateThread() {
|
didUpdateThread() {
|
||||||
this.subscribeToUpdates();
|
this.subscribeToUpdates();
|
||||||
|
this.chatThreadComposer.focus();
|
||||||
this.loadMessages();
|
this.loadMessages();
|
||||||
this.resetComposerMessage();
|
this.resetComposerMessage();
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,10 @@ export default class ChatComposerChannel extends ChatComposer {
|
||||||
|
|
||||||
composerId = "channel-composer";
|
composerId = "channel-composer";
|
||||||
|
|
||||||
|
get shouldRenderReplyingIndicator() {
|
||||||
|
return this.args.channel;
|
||||||
|
}
|
||||||
|
|
||||||
get presenceChannelName() {
|
get presenceChannelName() {
|
||||||
const channel = this.args.channel;
|
const channel = this.args.channel;
|
||||||
return `/chat-reply/${channel.id}`;
|
return `/chat-reply/${channel.id}`;
|
||||||
|
|
|
@ -18,6 +18,10 @@ export default class ChatComposerThread extends ChatComposer {
|
||||||
this.composer.reset(this.args.thread);
|
this.composer.reset(this.args.thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get shouldRenderReplyingIndicator() {
|
||||||
|
return this.args.thread;
|
||||||
|
}
|
||||||
|
|
||||||
get disabled() {
|
get disabled() {
|
||||||
return (
|
return (
|
||||||
!this.chat.userCanInteractWithChat ||
|
!this.chat.userCanInteractWithChat ||
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default class ChatChannelComposer extends Service {
|
||||||
|
|
||||||
@action
|
@action
|
||||||
focus(options = {}) {
|
focus(options = {}) {
|
||||||
this.textarea.focus(options);
|
this.textarea?.focus(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
|
Loading…
Reference in New Issue