user3625533
user3625533

Reputation: 415

dropdown width increases in IE11 when focus is in textbox with a placeholder

When the focus is in the <input> and I click on the <select> dropdown then the dropdown's width is increased. I tried to set the width on focus to 100%, but that's not working.

This is my html:

<html>
<body>
  <select>
    <option value="volvo">Volvo</option>
    <option value="saab">Saab</option>
    <option value="opel">Opel</option>
    <option value="audi">Audi</option>
  </select>
  <input type="text" placeholder="hello" />
</body>
</html>

Upvotes: 4

Views: 1352

Answers (1)

meebee
meebee

Reputation: 261

Add the onmousedown attribute and have it focus on the select dropdown so that it loses focus from the input box. For some reason focus on the input before accessing that select causes this error.

<select onmousedown="$(this).focus()">

Upvotes: 5

Related Questions