From d98dc26770f0bdfd091cf5b57bbc0a97ee3a43c6 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Sun, 13 Jul 2025 03:30:28 +0200 Subject: [PATCH] Fixed chatlog popout --- module/applications/ui/chatLog.mjs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/module/applications/ui/chatLog.mjs b/module/applications/ui/chatLog.mjs index e8f699e4..6f257dbc 100644 --- a/module/applications/ui/chatLog.mjs +++ b/module/applications/ui/chatLog.mjs @@ -1,6 +1,6 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLog { - constructor() { - super(); + constructor(options) { + super(options); this.targetTemplate = { activeLayer: undefined, @@ -14,6 +14,8 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo } addChatListeners = async (app, html, data) => { + super.addChatListeners(app, html, data); + html.querySelectorAll('.duality-action-damage').forEach(element => element.addEventListener('click', event => this.onRollDamage(event, data.message)) ); @@ -64,10 +66,10 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo Hooks.on('renderChatMessageHTML', this.addChatListeners.bind()); } - close(options) { - Hooks.off('renderChatMessageHTML', this.addChatListeners); - super.close(options); - } + // close(options) { + // Hooks.off('renderChatMessageHTML', this.addChatListeners); + // super.close(options); + // } async getActor(id) { // return game.actors.get(id);