Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#2597 closed bug (fixed)

Droppable events fired on hidden elements

Reported by: chrishandorf Owned by: paul
Priority: major Milestone: 1.5
Component: ui.core Version: 1.2.3
Keywords: drop event hidden Cc:
Blocked by: Blocking:


I created a Mac like hierarchical folder tree type widget using jQuery UI. When the triangle next to a folder is clicked it causes an open folder to hide its contents using jQuery UI functions such as hide() or slideToggle(). I found that even though these elements were not displayed in the web browser they were still receiving many droppable() events such as ".drop" and ".over". These events did not occur at the location where the elements were just hidden, but rather at the very top parent div that contained the elements many levels lower.

I was able to correct the problem with the following function, but it seems to me that jQuery UI should never fire a "drop" or "over" event on an element that is set to CSS display:none (or if any of the parents() of the element are set to CSS display:none).

function eventShouldBeIgnored(item) {

var ignore = false; $(item).parents().each(function() {

if ($(this).css("display") == "none") {

ignore = true;


}); return ignore;


Change History (4)

comment:1 Changed 15 years ago by paul

Status: newassigned

comment:2 Changed 15 years ago by paul

Resolution: fixed
Status: assignedclosed

comment:3 Changed 15 years ago by (none)

Milestone: 1.2.3

Milestone 1.2.3 deleted

comment:4 Changed 14 years ago by paul

Milestone: 1.5
Note: See TracTickets for help on using tickets.