mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-28 15:27:43 +00:00
Merge 2642716f24
into d089002698
This commit is contained in:
commit
747812b505
1 changed files with 11 additions and 3 deletions
|
@ -235,7 +235,14 @@ export default class Input extends Module {
|
||||||
async onEnable() {
|
async onEnable() {
|
||||||
this.chat.context.on('changed:chat.hype.display-input', () => this.ChatInput.forceUpdate());
|
this.chat.context.on('changed:chat.hype.display-input', () => this.ChatInput.forceUpdate());
|
||||||
this.chat.context.on('changed:chat.actions.room', () => this.ChatInput.forceUpdate());
|
this.chat.context.on('changed:chat.actions.room', () => this.ChatInput.forceUpdate());
|
||||||
this.chat.context.on('changed:chat.actions.room-above', () => this.ChatInput.forceUpdate());
|
this.chat.context.on('changed:chat.actions.room-above', () => {
|
||||||
|
this.ChatInput.forceUpdate();
|
||||||
|
if ( this.use_previews )
|
||||||
|
for(const inst of this.ChatInput.instances) {
|
||||||
|
this.removePreviewObserver(inst);
|
||||||
|
this.installPreviewObserver(inst);
|
||||||
|
}
|
||||||
|
});
|
||||||
this.chat.context.on('changed:chat.tab-complete.emotes-without-colon', enabled => {
|
this.chat.context.on('changed:chat.tab-complete.emotes-without-colon', enabled => {
|
||||||
for (const inst of this.EmoteSuggestions.instances)
|
for (const inst of this.EmoteSuggestions.instances)
|
||||||
inst.canBeTriggeredByTab = enabled;
|
inst.canBeTriggeredByTab = enabled;
|
||||||
|
@ -417,8 +424,9 @@ export default class Input extends Module {
|
||||||
if ( ! this.use_previews )
|
if ( ! this.use_previews )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const el = this.fine.getHostNode(inst),
|
const el = this.fine.getHostNode(inst);
|
||||||
target = el && el.querySelector('.chat-input__textarea');
|
const above = this.chat.context.get('chat.actions.room-above');
|
||||||
|
const target = above ? el : el && el.querySelector('.chat-input__textarea');
|
||||||
if ( ! target )
|
if ( ! target )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue