cowboy / jquery-resize

A resize event for ALL your jQueries!

Home Page:http://benalman.com/projects/jquery-resize-plugin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

resize event on window is always triggered

gluparia opened this issue · comments

I have the following code:

dynamic content

$(window).resize(function(e) {
console.log(e);
}

$("#test").resize(function() {
console.log("resize element");
});

The window resize callback is executed even though the window dimensions did not change.

JQuery 1.7.2

Happens here too

Browser: Chrome 22.0.1229.94
SO: Ubuntu 10.10

I have a flot instance with resize plugin. No series in it. Memory profile shows the behavior the attached print screen illustrates.

I'm kind of surprised to see a timer for this plugin.
The records point to several timers being fired and never ending (jquery.flot.resize.js:22).

Memory suddenly drops apparently because chrome is able to garbage collect something that is leaking...

flotresizememory_leak

This is a non standard resizing event, so the only way to get the desired behavior is using timers. I don't remember last time I used this plugin but I haven't noticed any memory leak.

Sorry just realized this repository is of jquery plugin wich is used by a flot plugin.

Anyway, just for information, the flot resize plugin example page

http://www.flotcharts.org/flot/examples/resize/index.html

has the same behavior.

I'll post this on their repo.

Thanks.