Bug Tracker

Opened 15 years ago

Closed 15 years ago

Last modified 11 years ago

#2942 closed bug (invalid)

"Too much recursion" error thrown by blockUI

Reported by: Heliologue Owned by:
Priority: major Milestone: 1.3
Component: core Version: 1.2.5
Keywords: Cc:
Blocked by: Blocking:

Description

Since updating to jQuery 1.2.6, the function to close a blockUI (2.07) invocation causes Firefox (+Firebug) to throw a "Too recursion" error and the CPU to spike--the UI is never unblocked.

IE is unaffected. jQuery 1.2.3 throws no such errors.

For the sake of context, here's our implementation:

$(document).ready(function() {
                $.blockUI({ 
                message: 'You have unread messages.<br /><a href="/usfportal/secure/general/myBannerMessages.jsp">Click here to read them</a><br /><br /><button type="button" class="jqmClose" value="Close This Notification">Close this notification</button>',
                    css: {
                        backgroundImage: 'url(/images/alert.png)',
                        backgroundPosition: 'center top', 
                        backgroundColor: '#FFF6BF',
                        border: '2px solid #FFD324', 
                        backgroundRepeat: 'no-repeat',
                        padding:'35px 20px 20px 20px',
                        fontSize: '1.2em',
                        top: '30%',
                        fontWeight: 'bold'
                        }
                }); 
                $('.jqmClose').click($.unblockUI); // if they click close, unblock the UI
            });

Change History (3)

comment:1 Changed 15 years ago by Heliologue

A very simple test case is available at http://heliologue.com/host/test_case

comment:2 Changed 15 years ago by Heliologue

On advice from Mike Alsup, writing the close function out properly fixes the issue

.click($.unblockUI) --> click(function() { $.unblockUI(); });

I don't remember why I shortcut it before, but the new jQuery release seems to have put a stop to it.

This should be closed as a non-issue.

comment:3 Changed 15 years ago by flesler

Milestone: 1.3
Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.