Due to the problem described in this question , I came across a situation where I need to attach the mousewheel event to the drop-down list only when it expands (I do this in the onclick event). However, I need to remove the mousewheel event when the list crashes. How can I detect this?
I cannot just use the onchange event because the user may not have changed their choice. I tried the onblur event, but in most browsers (except IE) the jump list remains focused when the list is collapsed.
Greetings.
var list = document.getElementById("list");
list.onclick = function (e) {
list.onmousewheel = function (e) {
}
window.document.onclick = function (e) {
list.onmousewheel = null;
window.document.onclick = null
}
};
EDIT:
, meder firefox. , . ? IE.
EDIT2:
,
Firefox 2 , , Safari .
, , firefox . , , .