Skip to content

Not getting correct element when searching for scroll parent element in effect? #725

@ryanzec

Description

@ryanzec

Describe the bug
When I attempt to programmatically get the scroll parent for an element inside an overlayscollbars element, I get the initializer element instead of the content elemnt which is the real scrollable element.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://stackblitz.com/edit/overlayscrollbars-solid-dr7ccyvu?file=package.json,src%2FApp.tsx
  2. Scroll the scrollable area and check the console logs

Expected behavior
I would expect the 1 to be logged out however I get 2 so it seems like the instead of getting the scroll parents element, it is getting the element one level higher. I also tried doing it manually instead of use scrollparent and got the same issue.

Examples
https://stackblitz.com/edit/overlayscrollbars-solid-dr7ccyvu?file=package.json,src%2FApp.tsx

Environment

  • OverlayScrollbars version: 2.11.1 (overlayscrollbars-solid: 0.5.6)
  • Used Operating System(s): Mac 15.3.1
  • Used Browser(s) (with version):Chrome (137.0.7151.120)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions