Hey there, I've been using this awesome library for displaying country codes and flags to our users. Check it out here: https://github.com/jackocnr/intl-tel-input
Everything was working perfectly on desktop, even when resizing the screen. But when I decided to test it on a mobile device with Android Chrome, that's when the issue popped up.
So here's the problem I encountered:
https://i.sstatic.net/YYZaH.png
Users are unable to select different countries because the scrolling functionality is hidden, and they can only see the default selected country.
I attempted to resolve this by using z-index:9999
, but unfortunately, it didn't work.
Here's the CSS code I implemented:
.intl-tel-input .country-list {
position: absolute;
z-index: 9999;
list-style: none;
text-align: left;
padding: 0;
margin: 0 0 0 -1px;
box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
background-color: white;
border: 1px solid #CCC;
white-space: nowrap;
max-height: 200px;
overflow-y: scroll;
}
I'm puzzled as to why this issue only seems to occur on mobile devices. Any ideas on how to fix it?