tjarman
tjarman

Reputation: 13

Datalist not functioning correctly on iOS Chrome

As far as I know, ios Chrome is the only browser where my datalist is doing this. Any other browser or device combination seems to work. I know there used to be support issues for datalists but not seeing anything recent that explains the issue I am having. The datalist only does this when the input box receives focus.

Image of the bug

<div>
  <label></label>
  <input id="plist" class="form-control" type="text" list="p" name="p" value="A">
  <datalist id="p">
    <option>S</option>
    <option>A</option>
    <option>B</option>
    <option>C</option>
    <option>D</option>
    <option>Aggron</option>
    <option>E</option>
    <option>F</option>
  </datalist>
</div>

Upvotes: 1

Views: 841

Answers (1)

user3045510
user3045510

Reputation: 1

IOS requires the value property

<div>
  <label></label>
  <input id="plist" class="form-control" type="text" list="p" name="p" value="A">
   <datalist id="p">
    <option value="S">S</option>
    ...
    </datalist>
</div>

Upvotes: 0

Related Questions