kopia lustrzana https://github.com/nolanlawson/pinafore
chore: clean up input.type property access (#1975)
Follows-up 4218c4ce64
.
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").
fix-string
rodzic
b9496c9bca
commit
5573f7cf32
|
@ -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
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue