From 97059cbf8dcfa41471cd1fb498f3b14066f03862 Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Tue, 19 Nov 2024 13:39:07 +0100 Subject: [PATCH] Fix js error on capslock checking --- resources/js/components/formElements/FormPasswordField.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/js/components/formElements/FormPasswordField.vue b/resources/js/components/formElements/FormPasswordField.vue index 408ada30..73c1a732 100644 --- a/resources/js/components/formElements/FormPasswordField.vue +++ b/resources/js/components/formElements/FormPasswordField.vue @@ -64,7 +64,9 @@ }) function checkCapsLock(event) { - hasCapsLockOn.value = event.getModifierState('CapsLock') ? true : false + if (typeof event.getModifierState === 'function') { + hasCapsLockOn.value = event.getModifierState('CapsLock') ? true : false + } } function setFieldType(event) {