diff --git a/src/apps/item-sheet.js b/src/apps/item-sheet.js index bbab931d..dcbf5226 100644 --- a/src/apps/item-sheet.js +++ b/src/apps/item-sheet.js @@ -110,7 +110,7 @@ export class DS4ItemSheet extends foundry.applications.sheets.ItemSheetV2 { context.enrichedDescription = ""; } - console.log("DS4ItemSheet: _prepareContext completed for item:", this.item.name); + return context; } @@ -253,22 +253,16 @@ export class DS4ItemSheet extends foundry.applications.sheets.ItemSheetV2 { /** @override */ async _onRender(context, options) { - console.log("DS4ItemSheet: _onRender called for item:", this.item.name); await super._onRender(context, options); - console.log("DS4ItemSheet: About to initialize tabs"); // Initialize first tab as active this._initializeTabs(); - console.log("DS4ItemSheet: Tabs initialized"); - - console.log("DS4ItemSheet: _onRender completed, elements handle editor activation automatically"); } /** @override */ async _onClose(options) { - console.log("DS4ItemSheet: _onClose called"); await super._onClose(options); } @@ -276,12 +270,10 @@ export class DS4ItemSheet extends foundry.applications.sheets.ItemSheetV2 { * Initialize tab state - show first tab, hide others */ _initializeTabs() { - console.log("DS4ItemSheet: _initializeTabs called"); const nav = this.element.querySelector(".ds4-sheet-tab-nav"); const sheet = this.element.querySelector(".ds4-sheet-body"); if (!nav || !sheet) { - console.warn("DS4ItemSheet: Could not find nav or sheet elements"); return; } @@ -289,8 +281,6 @@ export class DS4ItemSheet extends foundry.applications.sheets.ItemSheetV2 { const navItems = nav.querySelectorAll(".ds4-sheet-tab-nav__item"); const tabContents = sheet.querySelectorAll(".ds4-sheet-tab"); - console.log("DS4ItemSheet: Found", navItems.length, "nav items and", tabContents.length, "tab contents"); - // Remove active class from all items first navItems.forEach(item => item.classList.remove("active")); tabContents.forEach(content => content.classList.remove("active")); @@ -305,7 +295,7 @@ export class DS4ItemSheet extends foundry.applications.sheets.ItemSheetV2 { targetTab = targetNavItem?.dataset.tab; } - console.log("DS4ItemSheet: Setting active tab to:", targetTab); + // Set target tab navigation as active if (targetNavItem && targetTab) { @@ -315,9 +305,7 @@ export class DS4ItemSheet extends foundry.applications.sheets.ItemSheetV2 { const activeTabContent = sheet.querySelector(`.ds4-sheet-tab[data-tab="${targetTab}"]`); if (activeTabContent) { activeTabContent.classList.add("active"); - console.log("DS4ItemSheet: Tab content activated:", activeTabContent); } } - console.log("DS4ItemSheet: _initializeTabs completed"); } }