From ddeb031b0d1418c3ef2e2b72ba831509a04504bc Mon Sep 17 00:00:00 2001 From: ironmonk88 <75920956+ironmonk88@users.noreply.github.com> Date: Sat, 21 Jan 2023 09:48:48 -0800 Subject: [PATCH] 10.5 changes --- CHANGELOG.md | 4 ++++ alwayshp.js | 7 +++---- module.json | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65129e0..128e5a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# Version 10.5 + +Fixed issues with input field auto focussing. + # Version 10.4 Added Polish translation, thank you Lioheart diff --git a/alwayshp.js b/alwayshp.js index e471a4b..2cf3b63 100644 --- a/alwayshp.js +++ b/alwayshp.js @@ -51,7 +51,6 @@ export class AlwaysHP extends Application { .append($('
').addClass('token-stats flexrow').attr('title', this.tokentooltip).html((this.tokentemp ? `
${this.tokentemp}
` : '') + (this.tokenstat ? `
${this.tokenstat}
` : ''))); delete ui.windows[that.appId]; this.refreshSelected(); - $('#alwayshp-hp').focus(); }); } @@ -478,9 +477,7 @@ export class AlwaysHP extends Application { Hooks.on('init', () => { registerSettings(); -}); -Hooks.on('ready', () => { game.AlwaysHP = { app: null, toggleApp: (show = 'toggle') => { @@ -488,7 +485,6 @@ Hooks.on('ready', () => { if (show && !game.AlwaysHP.app) { game.AlwaysHP.app = new AlwaysHP().render(true); - window.setTimeout(() => { $('#alwayshp-hp').focus(); }, 100); } else if (!show && game.AlwaysHP.app) game.AlwaysHP.app.close({ properClose: true }); }, @@ -497,6 +493,9 @@ Hooks.on('ready', () => { game.AlwaysHP.app.refreshSelected(); } }; +}); + +Hooks.on('ready', () => { if ((setting("show-option") == 'on' || (setting("show-option") == 'toggle' && setting("show-dialog"))) && (setting("load-option") == 'everyone' || (setting("load-option") == 'gm' == game.user.isGM))) game.AlwaysHP.toggleApp(true); diff --git a/module.json b/module.json index a733fe0..64817d5 100644 --- a/module.json +++ b/module.json @@ -1,7 +1,7 @@ { "title": "Always HP", "description": "We're always updating HP, add a window to make it easier to adjust that", - "version": "10.4", + "version": "10.5", "authors": [ { "name": "IronMonk", @@ -35,7 +35,7 @@ "css/alwayshp.css" ], "url": "https://github.com/ironmonk88/always-hp", - "download": "https://github.com/ironmonk88/always-hp/archive/10.4.zip", + "download": "https://github.com/ironmonk88/always-hp/archive/10.5.zip", "manifest": "https://github.com/ironmonk88/always-hp/releases/latest/download/module.json", "bugs": "https://github.com/ironmonk88/always-hp/issues", "allowBugReporter": true,