1

<select>
      <option value="volvo">Volvo</option>
      <option value="saab">Saab</option>
      <option value="mercedes">Mercedes</option>
      <option value="audi">Audi</option>
    </select>
    
    <select>
      <option value="apple">Apple</option>
      <option value="mangoes">Mangoes</option>
      <option value="pineapple">Pineapple</option>
      <option value="strawberry">Strawberry</option>
    </select>

Now, in Windows systems, if we click on one dropdown it opens, and now without selecting any option, clicking on other dropdown closes the first one and opens the second one as expected.

But on Ubuntu and Mac the behaviour is different, if we click on one dropdown it opens and now without selecting any option if we click on another dropdown, it closes the first one but it doesn't open the clicked dropdown, it only opens it on second click.

Is there a way to change this behaviour using Angular and make it work as it is working in Windows?

meskobalazs
  • 15,741
  • 2
  • 40
  • 63
Bijay Singh
  • 819
  • 4
  • 14
  • 33

1 Answers1

0

The select boxes are native widgets, it means that you can't control their behaviour from JavaScript. And neither should you. I think it is a best practice that you follow the way widgets on a platform work, as that's what users will expect.

By the way if you really want to have it your way, you can use pure JS widgets, such as select2, in that case, you can use whatever behaviour you seem fit.

meskobalazs
  • 15,741
  • 2
  • 40
  • 63