Skip to content

Commit 475af9c

Browse files
committed
use isElement instead of isHTMLElement
We only require `.matches(…)` which is available on `Element` so no need for `HTMLElement`
1 parent a8cb2df commit 475af9c

File tree

1 file changed

+1
-1
lines changed
  • packages/@headlessui-react/src/utils

1 file changed

+1
-1
lines changed

packages/@headlessui-react/src/utils/dom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export function isHTMLLegendElement(element: unknown): element is HTMLLegendElem
7373
// - textarea
7474
// - video (if the controls attribute is present)
7575
export function isInteractiveElement(element: unknown): element is Element {
76-
if (!isHTMLElement(element)) return false
76+
if (!isElement(element)) return false
7777

7878
return element.matches(
7979
'a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'

0 commit comments

Comments
 (0)