Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140817

JQuery click event on select element click does not work in chrome (problem does not occur in windows environment)

$
0
0

When I click on the select element in chrome, the event does not get triggered on first click (but after that, i.e. on second, third...). Why and how can I change that? (works in FF)

 $("select").click(function() {
   console.log("click");
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<select>
  <option>a</option>
</select>

https://jsfiddle.net/pv2eajux/


Note: click on the text, not on the arrow


Viewing all articles
Browse latest Browse all 140817

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>