| Issue 829: | Mouseout not triggered after mouseover+updateEvent | |
| 2 people starred this issue and may be notified of changes. | Back to list |
When a user hovers over an event in the FullCalendar, I execute this code in the eventMouseover
eventMouseover: function (event) {
event._title = event.title;
event.title = "Click to Delete"
$("#calendar").fullCalendar("updateEvent", event);
},
All it does is store the original title, and then change it to the delete text. Then it tells the calendar to update the event so it will show the updated title.
Then in the eventMouseout event, I want to reset the title back to what it use to be.
eventMouseout: function (event) {
event.title = event._title;
$("#calendar").fullCalendar("updateEvent", event);
},
The problem is that with the updateEvent call in the mouseover event, the mouseout event will never fire due to an internal optimization.
May 14, 2013
Hi, Is this supposed to be fixed in fullcal 1.6.1?
Jul 2, 2013
I got the example to work by using setTimeout and a boolean guard (because mouseover is called again after updateEvent):
eventMouseover: function (event) {
if(event.toBeDeleted) return;
event._title = event.title;
event.toBeDeleted = true;
event.title = "Click to Delete"
setTimeout(function() {
$('#calendar').fullCalendar('updateEvent', event);
}, 0);
},
eventMouseout: function(event) {
event.toBeDeleted = false;
event.title = event._title;
setTimeout(function() {
$('#calendar').fullCalendar('updateEvent', event);
}, 0);
$(this).css('border-color', 'red');
}
- Regin
Aug 13, 2013
(No comment was entered for this change.)
Summary:
Mouseout not triggered after mouseover+updateEvent
(was: mouseout not triggered after mouseover+updateEvent)
Labels: Type-Bug |
|
| ► Sign in to add a comment |
Status: Accepted