From 5573f7cf3298d78b0d43c7f564dcf5b9a965341b Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Sun, 28 Feb 2021 22:46:23 +0000 Subject: [PATCH] chore: clean up input.type property access (#1975) Follows-up 4218c4ce640ab33897733b4858d5c60676b4a5aa. When accessing the IDL property, values tend to be reflected in a normalised type and form. In the case of HTMLInputElement.type, this means the returned value is always one of the supported and canonical lowercase values regardless of what value the corresponding attribute holds, or even if the attribute doesn't exist (the default will still be "text"). --- src/routes/_components/shortcut/ScrollListShortcuts.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/_components/shortcut/ScrollListShortcuts.html b/src/routes/_components/shortcut/ScrollListShortcuts.html index 393e3e9c..e61fd6f6 100644 --- a/src/routes/_components/shortcut/ScrollListShortcuts.html +++ b/src/routes/_components/shortcut/ScrollListShortcuts.html @@ -26,7 +26,7 @@ const { target, key } = event const isRadio = target && target.tagName === 'INPUT' && - (target.type || '').toLowerCase() === 'radio' + target.type === 'radio' const isArrow = key === 'ArrowUp' || key === 'ArrowDown' return isRadio && isArrow }