You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The getScrollingParent() function will blindly traverse up the DOM tree, looking for a parent element that would scroll the current one.
When Oruga is used in custom elements, that traversal will eventually lead .parentElement to resolve to null upon reaching the root of the shadow DOM, which is not accounted for.
git clone https://github.com/corrupt/oruga-taginput-test.git
cd oruga-taginput-test
npm install
npx vite build && npx vite preview
Then visit http://127.0.0.1:4173/, open dev console, click in the control and type j.
Expected behavior
No error should occur
Actual behavior
TypeError: Window.getComputedStyle: Argument 1 is not an object. is thrown.
The text was updated successfully, but these errors were encountered:
corrupt
changed the title
getScrollingParent causes Exception in custom elements
getScrollingParent() causes runtime error in custom elements
Jan 23, 2024
Overview of the problem
Oruga version: [0.8.2]
Vuejs version: [3.1.1]
OS/Browser: macOS 14.2.1/Firefox 121 (64-bit)
OS/Browser: macOS 14.2.1/Chrome 120 (64-bit)
Description
The
getScrollingParent()
function will blindly traverse up the DOM tree, looking for a parent element that would scroll the current one.When Oruga is used in custom elements, that traversal will eventually lead
.parentElement
to resolve tonull
upon reaching the root of the shadow DOM, which is not accounted for.Steps to reproduce
I've created a minimal example to reproduce this.
To try it out:
Then visit
http://127.0.0.1:4173/
, open dev console, click in the control and typej
.Expected behavior
No error should occur
Actual behavior
TypeError: Window.getComputedStyle: Argument 1 is not an object.
is thrown.The text was updated successfully, but these errors were encountered: