Alex Rivera | Logout

Google Chrome: Focus issue with the scrollbar

Asked 2009-08-28T07:05:18.403
9

I am using jQuery 1.3.2.

There is an input field in a form. Clicking on the input field opens a div as a dropdown. The div contains a list of items. As the list size is large there is a vertical scrollbar in the div. alt text

To close the dropdown when clicked outside, there is a blur event on the input field.

Now the problem is:

In chrome(2.0.172) when we click on the scrollbar, the input field will loose focus. And now if you click outside, then the dropdown won't close(as the input has already lost focus when you clicked on the srollbar)

In Firefox(3.5), IE(8), opera(9.64), safari() when we click on the scrollbar the input field will not loose focus. Hence when you click outside (after clicking on the srollbar) the dropdown will close. This is the expected behaviour.

So In chrome once the scrollbar is clicked, and then if I click outside the dropdown won't close. How can i fix this issue with chrome.

Edit
Report

1 Answer

0

Could you maybe set the blur event to fire on the drop down div as well? This way, when either the input or the drop down loses focus, it will dissapear...

answered 2009-08-28T07:18:57.300

Your Answer