Issue 1116: Event resize error due to dynamic height change
Status:  Released
Owner: ----
Closed:  Jun 2014
Reported by vroma...@gmail.com, Sep 14, 2011

I have notice a incompatibility bug with fullcalendar 1.5.2 and jquery 1.6.4

I have implemented a resize function to adjust calendar height : $(window).resize(function(){
    $('#fc').fullCalendar('option', 'height', 700);
}) 

everything work fine with jquery 1.5.2 but when I switch to the last jquery version event resizing didn't work not fine. Event on fullcalendar didn't grow or decrease when I start resizing, in other words event height don't follow the cursor when I resize event (and additionally window resize function is trigged).

Oct 2, 2011
Project Member #1 adamrs...@gmail.com
http://arshaw.com/fullcalendar/support/

"please submit a report with a detailed description and a demonstration of the bug. This can be a link to a website or a ZIP containing a runnable HTML file. Please include everything needed to recreate the bug (JS, CSS, event JSON)."
Status: Reproducing
Oct 4, 2011
#2 vroma...@gmail.com
hi Adams,

Thanks and sorry if I didn't provide necessary resources to reproduce the bug.

Follow this use case :

1) run this code https://gist.github.com/1261136, and try to resize a event. Event didn't follow cursor.

2) Now replace jquery version 1.6.4 to 1.5.2, and then problem is resolved.


thanks

vincent
Mar 22, 2012
#3 low...@schedulista.com
This issue appears to still be a problem in 1.5.3 of fullcalendar.

Here's what you need to change in the agenda-views.html demo to reproduce the problem:

https://github.com/lmanners/fullcalendar/commit/1eef1ad73bfede4a33774bb8fcea567ff61e910e

Github repo that recreates the bug:
https://github.com/lmanners/fullcalendar
Jun 23, 2012
#4 galehous...@gmail.com
As a workaround to maintain event resizing functionality but support dynamic sizing of calendar height, I avoid setting the calendar's height when event resizing is in progress.  This can be implemented as so:

var isResizingEvent = false;

$('#calendar').fullCalendar({
    ...
    eventResizeStart: function () { isResizingEvent = true; },
    eventResizeStop: function () { isResizingEvent = false; }
});

$(window).resize(function() {
    if (isResizingEvent) { return; }
    var viewportHeight =  $(window).height()
    $('#calendar').fullCalendar('option', 'contentHeight',  $(window).height());	
});
Oct 8, 2012
#5 oandr...@gmail.com
This should be added as a general solution. I have tried to debug this problem for some time now. Many thanks, galehous...@gmail.com.
Apr 17, 2013
#6 viktor.f...@gmail.com
The "hack" proposed by galehouse works great! Thanks!

I do hope the next version of fullcalendar will have this bug fixed in more proper way.

PS I use $(window)resize() as well, since resizeWindow never gets triggered.
Aug 13, 2013
Project Member #7 adamrs...@gmail.com
(No comment was entered for this change.)
Summary: Event resize error due to dynamic height change (was: event resize error due to dynamic height change)
Labels: Type-Bug
Mar 9, 2014
#8 willorme...@googlemail.com
This bug appears to be still present in the version 2 beta.
I'm using Jquery 1.9.1 and Jquery UI 1.10.3.

window.resize is being triggered when resizing an event's time in week or day mode
- but does not happen if extending a date to another day
Apr 21, 2014
#9 chris.fi...@gmail.com
This is the result of event bubbling. Note that the line numbers below are from v2.0.0-beta2.

Adding the following to line 5138 (before "resize: function(ev, ui) {") seems to solve the problem.

create: function (event, ui) {
    $(this).parent().on('resize', function (e) {
        e.stopPropagation();
    });
},

I would think that a simple "ev.stopPropagation();" on line 5139 (after "resize: function(ev, ui) {") would take care of it, but it doesn't.
Jun 11, 2014
Project Member #10 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Accepted
Jun 15, 2014
Project Member #12 adamrs...@gmail.com
this issue has been addressed and version 2.0.1 has been released: http://arshaw.com/fullcalendar/download/
Status: Released
Jul 2, 2014
#13 subhanul...@gmail.com
how i expand the event to more than one day
like in the given site expand the event to more than one day from left to right
http://arshaw.com/js/fullcalendar-1.6.3/demos/selectable.html