Fix issue with Edit field not functioning correctly in Chrome

This commit is contained in:
rlauuzo 2024-08-14 20:53:19 +02:00 committed by GitHub
parent 6170f3886f
commit fbd542b920
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
});