1

This is not working on Chrome?

<select id="mySelect" onmouseout="defocusSelect()">
    <option>A</option>
    <option>B</option>
</select>
...
function defocusSelect(){
document.getElementById('mySelect').blur();
}

I need this in order to hide the options list when I move the mouse away from the select. It is not working in Chrome. Does anyone know what can I use instead of blur() in order to make this work on Chrome?

Anders
  • 8,307
  • 9
  • 56
  • 88
Alexandra Chis
  • 85
  • 1
  • 2
  • 9

1 Answers1

0

Here is my hack for this problem

var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
        if(is_chrome) $(".option").hide();

where class "option" represent all the option of select box.

Here I have used jquery to hide you can use anything you like.

Mr Coder
  • 8,169
  • 5
  • 45
  • 74