There seems to be a problem with any select elements that I create in my project, on desktop everything renders fine, as soon as I open the google chrome inspector and click on the select box to render the options, they appear like this:
The options dropdown appears in a different position than where it should be, the options text is barely visible.
The above image was taken in isolation mode on google chrome.
Anywhere I add a simple select box as HTML in my project it renders like this when I click on it.
My configuration is:
- next.js - 12.1.0v
- React - 18
- Tailwindcss v3
- default tailwind config (only added tailwind elements)
Select box code:
<select value={ selectedValue } data-e2e={ attributeName } onChange={ (event) => onChangeAttribute(event) } className="p-[9px] shadow placeholder:text-textgrey rounded border border-midgrey w-5/6">
{
attributeValues.map((attribute, index) => {
return (<option
className="font-roboto"
key={ `${attribute.label}-${index}` }
value={ attribute.value }
data-e2e={ attribute.value }
>
{ attribute.lable }
</option>);
})}
</select>
It doesn't really matter what select classes I use, I added a dummy select HTML element on the same page and it was rendering the same (broken).
<select>
<option value="1">1</option>
<option value="2">2</option>
</select>
Has anyone run into the same problem?