Serhioromano / bootstrap-calendar

Full view calendar with year, month, week and day views based on templates with Twitter Bootstrap.
http://bootstrap-calendar.eivissapp.com/
MIT License
3.02k stars 1.29k forks source link

Modal not firing after subsequent calendar cell clicks #170

Open stokes84 opened 10 years ago

stokes84 commented 10 years ago

If you click from one day firing the drop down listing events then click directly into another day causing the previous events list to slide up then the current day to slide down this renders the modal trigger inoperable.

Here's a video example: http://www.youtube.com/watch?v=BUAO6hDLc_I

If you click to open the event list, then click to close it on the same cell you can then click a different day and the modal is still functional.

stokes84 commented 10 years ago

Still haven't been able to fix this one. It involves setting self.activecell = 0 when both a sliding cell is closed (works now) and when a subsequent cell is clicked and closes automatically (the issue area).

bobbaker commented 10 years ago

I'm having this exact same problem. It seems to only occur when clicking on a day, then another without clicking an event in between.

bobbaker commented 10 years ago

I had said this earlier, then deleted my comment, but I'm pretty sure again that this has something to do with the slideUp & slideDown effects.

EDITED THIS AGAIN .... It's the initial slideUp effect.

slider.slideUp('fast', function() {

I changed 'fast' to 0 & have had no problems since.

slider.slideUp(0, function() {
smoreau commented 10 years ago

I had the same issue and the change suggested by bobbaker fixed my problem. However, the effect is not the same as the fix alters the speed of the slide up.

Instead, I fix this issue by replacing the line:

self._update_modal();

by the following:

setTimeout(function(){
    self._update_modal();
}, 400);

In that case, we wait 400ms (which is 200ms for the fade out and 200ms of the slide up) before we call the function '_update_modal'.