From fbd542b920485912c31aa2d6e7f0499834f6c2ca Mon Sep 17 00:00:00 2001 From: rlauuzo <46294892+rlauuzo@users.noreply.github.com> Date: Wed, 14 Aug 2024 20:53:19 +0200 Subject: [PATCH] Fix issue with Edit field not functioning correctly in Chrome --- .../Configuration/inject.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js index c2a7a89..335f68d 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js @@ -287,7 +287,10 @@ const introSkipper = { inputContainers.forEach(container => { const displayInput = container.querySelector('[id$="Display"]'); const editInput = container.querySelector('[id$="Edit"]'); - displayInput.addEventListener('pointerdown', () => this.switchToEdit(displayInput, editInput)); + displayInput.addEventListener('pointerdown', (e) => { + e.preventDefault(); + this.switchToEdit(displayInput, editInput); + }); editInput.addEventListener('blur', () => this.switchToDisplay(displayInput, editInput)); displayInput.value = this.formatTime(parseFloat(editInput.value) || 0); });