Select with selectedIndex = -1 still shows the first option

Fixed Issue #10332080

Details

Author
Dzmitry S.
Created
Dec 28, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
  • Internet Explorer
Reports
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

Current behavior
As u can see on the screenshot http://prntscr.com/dotsln select has selectedIndex equals to -1 value is empty, but it shows the first option.
I can workaround it by explicitly calling document.getElementById('test').selectedIndex = -1;, but I can’t write a test for it because select has all correct properties (selectedIndex = -1, value = '').

Expected behavior
I think it should never be the case. If select has selectedIndex equals to -1 then it should show a blank line, otherwise it should have selectedIndex equals to 0.

Minimal reproduction of the problem with instructions
https://plnkr.co/edit/jZNAV8IMFO5dV4ypmAFE?p=preview
The repro includes angular 2 code, but it’s irrelevant to the issue. At first I thought it’s a bug in angular, but it works as expected in Chrome/Firefox.

Browser:
IE 9-11/Edge

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Brad E.”

      Changed Status to “Not reproducible”

    • Hello,

      Thank you for providing this information about the issue. We are unable to reproduce this behavior in Edge 14393 public stable and it exhibits the same behavior as other browsers. Please reopen this case if you can provide us with new information to consider.

      Best Wishes,
      The MS Edge Team

    • the issue is still reproducible. here’s an example http://plnkr.co/edit/ib9TaA86BlzpHOWgXJ4Q?p=preview

      you wan’t able to reproduce because I worked around it in the latest version

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

      Changed Status from “Not reproducible”

      Changed Assigned To to “Travis L.”

      Changed Assigned To from “Travis L.” to “Aparna P.”

      Changed Status to “Confirmed”

      Changed Status from “Confirmed” to “Fixed”

    • Hello,

      Thank you for providing this information about the issue. We are pleased to report this feature is fixed in Edge 16275 and is available in our latest Insider Preview build in the Fast ring.

      Best Wishes,
      The MS Edge Team

    You need to sign in to your Microsoft account to add a comment.

    Sign in