1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-27 21:05:53 +00:00

bugfix: fix BTTV and 7TV emote inline preview rendering while "Display Room Actions above the chat input box" is enabled

This commit is contained in:
Th3Dilli 2025-06-19 01:37:29 +02:00
parent d089002698
commit b3efaf7041
No known key found for this signature in database
GPG key ID: 7130A139E74B6905

View file

@ -235,7 +235,14 @@ export default class Input extends Module {
async onEnable() {
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-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 => {
for (const inst of this.EmoteSuggestions.instances)
inst.canBeTriggeredByTab = enabled;
@ -417,8 +424,9 @@ export default class Input extends Module {
if ( ! this.use_previews )
return;
const el = this.fine.getHostNode(inst),
target = el && el.querySelector('.chat-input__textarea');
const el = this.fine.getHostNode(inst);
const above = this.chat.context.get('chat.actions.room-above');
const target = above && el ? el : el.querySelector('.chat-input__textarea');
if ( ! target )
return;