Search code examples
javascriptonclickmobile-safari

Mobile Safari select onclick event


My page has select tag with onclick="" event:

<select onclick="OnChange()">

It works only on the second click with mobile Safari - other browsers work fine.

How to get the first onclick event with mobile Safari?


Solution

  • Why not just use the onChange attribute instead. It's more suited to what you want. Also, using onClick doesn't factor in tabbed access to the field...