| Issue 2432: | Destroying the calendar sometimes causes all window resize handlers to be unbound | |
| 1 person starred this issue and may be notified of changes. | Back to list |
```js
function initialRender() {
// ...
if (options.handleWindowResize) {
windowResizeProxy = debounce(windowResize, options.windowResizeDelay); // prevents rapid calls
$(window).resize(windowResizeProxy);
}
}
```
`windowResizeProxy` in case of `handleWindowResize: false` is `undefined`
and in destroy:
```js
function destroy() {
// ...
$(window).unbind('resize', windowResizeProxy);
}
```
call:
`$(window).unbind('resize', windowResizeProxy);`
is equal to:
`$(window).unbind('resize', undefined);`
that equal to:
`$(window).unbind('resize');`
and this last may unbind 3rd party resize event;
Fix for this is too implement as:
```js
function destroy() {
// ...
if (options.handleWindowResize) {
$(window).unbind('resize', windowResizeProxy);
}
}
```
Feb 20, 2015
Implemented but not yet released fix: https://github.com/arshaw/fullcalendar/commit/1ff5df10b5686243d0ddcf42398680c8bf4d24e7 test: https://github.com/arshaw/fullcalendar/commit/f9e85bb8e51e9f34f4fcc891abfdf51d978ad85b
Status:
Implemented
Feb 21, 2015
This has been released. Thanks! https://github.com/arshaw/fullcalendar/releases/tag/v2.3.0
Status:
Released
|
|
| ► Sign in to add a comment |
Status: Accepted
Labels: Type-Bug