Thursday, January 21, 2010

jquery blockUI bug with internet explorer

When using jquery plugin blockUI if the user doesn't move the mouse after the control returns the cursor will continue to spin.
This is documented on the following post:
Here is the fix.
Edit the jquery.blockUI.js file
After line 379 add the line below.
Line 379: els = $('.blockUI', el);
Add this line: els[1].style.cursor = 'default';

It depends on what version of blockUI.js you have, but here is what I ended up using around line 390.

 var els;
 if (full) // crazy selector to handle odd field errors in ie6/7
  els = $('body').children().filter('.blockUI').add('body > .blockUI');
 else
  els = $('.blockUI', el);
  if ($.browser.msie && els[1] !== undefined) {
   els[1].style.cursor = 'default';
  }