A
A
AVBanin2020-10-22 22:01:26
HTML
AVBanin, 2020-10-22 22:01:26

Why is firefox ignoring option selected on certain select name values?

Wrote the following:

<form action="#" method="post" enctype="multipart/form-data">
      <label class="visually-hidden">Лейбл
        <select autocomplete="on" id="wellPosition" name="wellPosition" size="1" required>
          <option value="" disabled selected>Вместо плейсхолдера</option>
          <option value="first">Вариант 1</option>
          <option value="second">Вариант 2</option>
          <option value="Новая Москва">Вариант 3</option>
        </select>
      </label>
    </form>

Chrome, edge - norms, firefox stubbornly gives out an option with the value "New Moscow". Or, if there is no such option, it leaves the default field empty.
As soon as I change the select name to "Position" - everything works the same with blink-browsers.

<select autocomplete="on" id="wellPosition" name="Position" size="1" required>...

No, autocomplete="off" doesn't work. Checked.
Tell, knowledgeable people, what is happening with Firefox differently and at what level?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shamanov, 2020-10-25
@SilenceOfWinter

because the standard does not define what to do if a fool decides to use them - disabled and selected are mutually exclusive attributes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question