Bug Tracker

Opened 5 years ago

Closed 5 years ago

#15229 closed bug (cantfix)

IE: Mouseleave fires on table element when select options open

Reported by: Mottie Owned by: Mottie
Priority: undecided Milestone: None
Component: unfiled Version: 1.11.1
Keywords: Cc:
Blocked by: Blocking:

Description

I have a table containing selects within a column. An event listener is attached to the table (or tbody) to perform another action (e.g. give focus to another element).

In IE10+, when the user tries to open the select, it immediately closes because when hovering over the select options the table "mouseleave" event fires.

Here is a demo of this issue: http://jsfiddle.net/eY8uH/1073/

One fix would be to ensure the event.target is the same as the original element: http://jsfiddle.net/eY8uH/1075/

$('table').on('mouseleave', function(e){
    if (e.target.tagName === 'TABLE') {
        $(':focus').blur();
    }
});

Change History (3)

comment:1 Changed 5 years ago by dmethvin

Owner: set to Mottie
Status: newpending

I agree this looks like a bug, and it seems to have been around a while. Has this been reported to Microsoft as a bug?

The mouseleave event bubbles up the DOM tree, so it's not wrong for such an event to have an event.target that is not the element where the event is attached. In your particular case you know what you expect and can do a workaround, but I don't know of a general one that can be done at the jQuery level.

comment:2 Changed 5 years ago by Mottie

Status: pendingnew

I only just reported this issue (https://connect.microsoft.com/IE/feedbackdetail/view/962618/).

I only reported this issue as maybe something jQuery can do to filter out the unexpected event since only IE appears to cause this particular problem.... but you're right, changing this within jQuery would cause other issues. So, thank you and please feel free to close this issue.

comment:3 Changed 5 years ago by dmethvin

Resolution: cantfix
Status: newclosed
Note: See TracTickets for help on using tickets.