Ticket #2488 (closed bug: invalid)
blockUI doesn't remove block correctly if displayMode is set
| Reported by: | borgar | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.2.4 |
| Component: | plugin | Version: | 1.2.3 |
| Keywords: | blockui | Cc: | |
| Blocking: | Blocked by: |
Description
If displayMode option is set when $(elm).block() is called, calling $(elm).unblock() doesn't remove the overlay-elements.
This seems to be because $.blockUI.impl.remove() always looks for curtain elements with $('.blockUI'), but with displayMode set this class is replaced with '.displayBox' on init, and thus never found on remove.
My situation looks something like this:
function customKill ( e ) {
box.unblock({fadeOut : false}); some other stuff...
};
$(elm).block(, null, {
displayMode : customKill
});
$('div#someOutsideTrigger').click(function(e){ customKill( e ); });
I've fixed this locally by having remove look for $('.blockUI, .displayBox'). But I am not familiar with the internals of this plugin to say if this is a good all-around fix.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

This is not a jQuery core bug. Please report plugin bugs to the plugin's author, or ask on the jQuery forums. jQuery UI bugs should be reported on the UI bug tracker, http://dev.jqueryui.com .