Bug Tracker

Ticket #2488 (closed bug: invalid)

Opened 6 years ago

Last modified 5 years ago

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

comment:2 Changed 5 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

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 .

Note: See TracTickets for help on using tickets.