Skip to content

Scrollbar disappears from HTML when using dropdown search input #669

@M4XPRD

Description

@M4XPRD

Hi!

I have an issue I can't find a solution for at this moment. I'd like to get any help to understand how OverlayScrollbar works.

Right now I'm using intl-tel-input library to create a fancy looking phone input. When I apply a scrollbar, everything works just fine:

document.addEventListener('DOMContentLoaded', () => {
  const countryListbox = document.querySelector('#iti-0__country-listbox')

  OverlayScrollbars(countryListbox, {
    scrollbars: {
      theme: 'os-scrollbar-dropdown'
    }
  })
})

But this phone input has an option to use the "Search" input section, which is needed to find country code quickly. And when I use it, everything falls apart. I'm not sure yet why, but when I remove OverlayScrollbar, everything works correctly.

image

It turns out, that OverlayScrollbar is just disappeared from the code, whenever I use "Search" input.

image

HTML before I do any input:

image

HTML after I type anything:

image

I've tried using MutationObserver, but it didn't help at all. If I could get any help, that would be perfect. It's it's definitely not an OS's issue, I would further keep searching for a solution. Thank you anyway, library is great :)

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