| Issue 1627: | getRowTops() at DayEventRenderer.js:352 throws an error in fringe case. | |
| 1 person starred this issue and may be notified of changes. | Back to list |
This happens when clicking the next month button for the 2nd time for me.
Here's the stack trace.
Uncaught TypeError: Cannot read property 'offsetTop' of undefined fullcalendar.js:4826
getRowTops fullcalendar.js:4826
renderDaySegs fullcalendar.js:4554
renderEvents fullcalendar.js:2617
rerenderEvents fullcalendar.js:526
reportEvents fullcalendar.js:511
fetchers fullcalendar.js:925
_fetchEventSource fullcalendar.js:958
fetchEventSource fullcalendar.js:914
fetchEvents fullcalendar.js:908
refetchEvents fullcalendar.js:504
updateEvents fullcalendar.js:495
renderView fullcalendar.js:397
next fullcalendar.js:567
$.each.$.each.prevButton fullcalendar.js:767
jQuery.event.dispatch jquery-1.8.3.js:3058
jQuery.event.add.elemData.handle.eventHandle
getRowDivs() is returning an array of jQuery nodes, but the first item is empty, so that is why offsetTop causing the Uncaught TypeError.
I'm guessing that I'm doing something unexpected when I'm rendering the calendar and then the 2nd render is thrown off.
I fixed this by changing
for (i=0; i<rowCnt; i++) {
tops[i] = rowDivs[i][0].offsetTop; // !!?? but this means the element needs position:relative if in a table cell!!!!
}
to:
for (i=0; i<rowCnt; i++) {
if (rowDivs[i][0]) {
tops[i] = rowDivs[i][0].offsetTop; // !!?? but this means the element needs position:relative if in a table cell!!!!
}
}
Don't know what other ill effects might be caused by doing this, but so far so good. Don't know if you want to implement this conditional test into the master branch, but at the very least now with this post, I've got a breadcrumb trail to follow the next time I run into this.
Thanks for all the hard work!
Aug 18, 2013
Project Member
#1
adamrs...@gmail.com
Status:
ReproTemp
Aug 25, 2013
This message is being bulk-sent to a number of issues, both [very] old and new.
I have been working on taming this issue tracker, which has gotten out of control after months of neglect. You are receiving this message because I could not successfully reproduce the bug you were reporting with a reasonable amount of effort. I have written some new bug-report guidelines to be used by all bug reports going forward:
http://arshaw.com/fullcalendar/wiki/Report-a-Bug/
Its salient point is that all bug reports should have an isolated demonstration, viewable online with a tool like JSFiddle.
If the bug you originally reported is still important to you, could you please first try the latest version of FullCalendar and see if it is fixed? If not, could you please file a NEW bug report that follows the new guidelines? This issue will not be monitored for further comments.
I'm sorry I have taken so long to respond to many of your request, and I'm sorry if this new procedure causes extra work for you. Going forward, the issue tracker will be much more of a well-oiled machine.
Again, if you must, PLEASE SUBMIT A *NEW* BUG REPORT (following the new guidelines) INSTEAD OF COMMENTING ON THIS ONE. Further comments on this report will be ignored. Thanks.
Status:
Invalid
Labels: -Type-Defect Type-Bug |
|
| ► Sign in to add a comment |