diff --git a/src/hooks/init.js b/src/hooks/init.js index a57f4a6e..0f339af2 100644 --- a/src/hooks/init.js +++ b/src/hooks/init.js @@ -65,7 +65,6 @@ async function init() { registerSystemSettings(); - foundry.applications.apps.DocumentSheetConfig.unregisterSheet(Actor, "core", foundry.appv1.sheets.ActorSheet); foundry.applications.apps.DocumentSheetConfig.registerSheet(Actor, "ds4", DS4CharacterActorSheet, { types: ["character"], makeDefault: true, @@ -74,7 +73,6 @@ async function init() { types: ["creature"], makeDefault: true, }); - foundry.applications.apps.DocumentSheetConfig.unregisterSheet(Item, "core", foundry.appv1.sheets.ItemSheet); foundry.applications.apps.DocumentSheetConfig.registerSheet(Item, "ds4", DS4ItemSheet, { makeDefault: true }); foundry.applications.apps.DocumentSheetConfig.unregisterSheet( ActiveEffect, diff --git a/src/hooks/render.js b/src/hooks/render.js index c8028dbf..1714f6d5 100644 --- a/src/hooks/render.js +++ b/src/hooks/render.js @@ -17,10 +17,13 @@ export function registerForRenderHooks() { * Select the text of input elements in given application when focused via an on focus listener. * * @param {Application} app The application in which to activate the listener. - * @param {JQuery} html The {@link JQuery} representing the HTML of the application. + * @param {HTMLElement} element The HTML element representing the HTML of the application. */ -function selectTargetInputOnFocus(app, html) { - html.find("input").on("focus", (ev) => { - ev.currentTarget.select(); +function selectTargetInputOnFocus(app, element) { + const inputs = element.querySelectorAll("input"); + inputs.forEach(input => { + input.addEventListener("focus", (ev) => { + ev.currentTarget.select(); + }); }); }