iOS Safari Behavior When Multiple Selections Exist

Asked 2 years ago, Updated 2 years ago, 46 views

For example, there is an input field where you can select the date and time below.

<select name="year">
    <option value="0">---</option>
    <option value="2000">2000</option>
    <option value="2001">2001</option>
    <option value="2002">2002</option>
    <option value="2003">2003</option>
</select> year
<select name="month">
    <option value="0">---</option>
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
</select> month
<select name="day">
    <option value="0">---</option>
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
</select>day

Let's say you choose from the left.

If you tap the other select box without pressing Finish, the xth item in the select box that is currently in focus will be selected as the xth item in the previous item.Actually, I would like you to select the previous select box, but is there a way to solve this problem?

ios html

2022-09-30 20:28

3 Answers

You can set a click event to the one you tap and implement it in javascript.


2022-09-30 20:28

In iOS, the drum roll is commonly referred to as the drum roll, and the form parts with tabindex in the upper left corner with the prev next icon (<>) are focused in ascending order of numbers.There is a UX representative from a company who has many users doing this.
You can also exclude tabindex=-1.

Then, the drum roll comes out and you may tap the next form without pressing the completion, but you will need to create the form element and tabindex properly, and if you still can't, you will need to listen to the event in JavaScript.

In addition, experience has shown that optgroup may behave in ways that iOS does not quite understand, such as making multiple choices.


2022-09-30 20:28

Can't tabindex control it well?


2022-09-30 20:28

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.