Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Full Calendar eventDrop firing eventClick in Firefox 15

I don't know what exactly to change about the following code to make it work in Firefox 15:

    eventDrop: function (event, dayDelta) {
        updateCalendarEvent(event.id, dayDelta);
        //Firefox 15 fires eventClick for no good reason???
    },
    eventClick: function (event) {
        alert('event click');
        if (event.url) {
            alert(event.url);
            vUrl = '../Activities/' + event.url;
            openActivityAddEditDialog(vUrl, 'Edit Activity');
            return false;
        }
    },

I have done a fair bit of research and this is definitely a BUG. Code works fine in Chrome, Safari, Firefox 14 & even IE - but not Firefox 15. It's been almost 2 months and no fix is in sight.

Someone posted this about a work-around hack here: http://code.google.com/p/fullcalendar/issues/detail?id=1523

Another similar unanswered Full Calendar Firefox SO question: Full Calendar event hyperlinks automatically fire in Firefox

like image 848
user1778402 Avatar asked Dec 27 '25 16:12

user1778402


1 Answers

You will also have some event data like this:

events: [

{id: '76',title: 'Hot Shave',data: 'Some data',start: new Date(2012,9, 17, 13 , 55),end: new     Date(2012,9,17, 13 , 115),allDay: false, url: '<someurl>'}
],

Change the event where it says "url:" to "workingurl:" and update your eventclick code to be:

eventClick: function (event) {
        alert('event click');
        if (event.workingurl) {
            alert(event.workingurl);
            vUrl = '../Activities/' + event.workingurl;
            openActivityAddEditDialog(vUrl, 'Edit Activity');
            return false;
         }
    },

That should stop FF firing off the click based on the url: property which then no longer exists.

like image 53
Keith Osborne Avatar answered Dec 30 '25 05:12

Keith Osborne



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!