Bug Tracker

Ticket #9422 (closed bug: invalid)

Opened 4 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

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

comment:1 Changed 4 years ago by rwaldron

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

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

comment:2 Changed 4 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 3 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

Note: See TracTickets for help on using tickets.