ember-popperjs icon indicating copy to clipboard operation
ember-popperjs copied to clipboard

fix: use Element instead of HTMLElement

Open knownasilya opened this issue 3 years ago • 3 comments

fixes #185 Should not be a breaking change since the type is broadened

knownasilya avatar Aug 08 '22 14:08 knownasilya

Looks awesome! Thanks!

NullVoxPopuli avatar Aug 08 '22 16:08 NullVoxPopuli

The error is on createPopper only taking an HTMLElement, which I think is incorrect, because I tested popper on SVG the other day, and I think that still works.

I think the main thing is that the element needs getBoundingClientRect and stuff, and I'm not sure if there are other types. But Element, as defined by MDN, is def too simple for popper. :thinking:

what's your use case for switching to Element? would HTMLElement | SVGElement work?

NullVoxPopuli avatar Aug 08 '22 18:08 NullVoxPopuli

Took that approach since you mentioned it in the issue mentioned. Can try that

knownasilya avatar Aug 09 '22 16:08 knownasilya