Bug Tracker

Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#9422 closed bug (invalid)

Recursion with .trigger('resize') within $(window).resize(...)

Reported by: anonymous Owned by:
Priority: low Milestone: 1.next
Component: misc Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:

Description

Some of my "plugin" are broke with v1.6.1. Working with v1.5.1

var drop = $('<div class="dropmenu"></div>');

// Resize drop menu
$(window).resize(function (e) {
	drop.trigger('resize'); // toggle this line to cause recursion...
})

drop.resize(function (e) {
	// too much recursion
})

Change History (3)

comment:1 Changed 6 years ago by rwaldron

  • Component changed from unfiled to misc
  • Priority changed from undecided to low
  • Resolution set to invalid
  • Status changed from new to closed

You've created a endless recursive call stack - I doubt that ever worked.

comment:2 Changed 6 years ago by dmethvin

Is drop even attached to the document? It sounds like this is a plugin problem, so please ask for help on the forum and provide a simplified but complete example.

comment:3 Changed 6 years ago by junalmeida

I don't see an endless recursive with the sample provided. I have a similar problem after updated my jq to 1.6.1. "too much recursion" on firefox," Uncaught RangeError: Maximum call stack size exceeded" on google chrome, useless error page on I.E 9 I use something like this example, like window resize and some div trigger to resize event.

Reverting to 1.5.x

Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Modify Ticket

Change Properties
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.