Issue 1168: Drag and drop don't work with jquery-1.7
Status:  Released
Owner: ----
Closed:  Aug 2013
Reported by prodegre...@gmail.com, Nov 6, 2011
If I update the jQuery version in the demo files, d&d don't work any more, the Drop event is not called. Ideas?

Nov 6, 2011
#1 bober.br...@gmail.com
It would be really nice to not have to use jquery 1.5.2 with this plugin.  Dropping appears to be the primary issue with jquery 1.7.  Any thoughts on when we can use the fullcalendar plugin with an up to date jquery?


PS: This is without a doubt one of the top, if not the best, jQuery plugin.  Thanks!
Nov 15, 2011
#2 filippo....@gmail.com
I have found this solution:

function draggableSlotEvent(event, eventElement, timeElement) {
 [...]
 start: function (ev, ui) {
 var ev = ev.originalEvent; /* added this line FIXME filipogg@gmail.com */
 [...]
 drag: function(ev, ui) {
 var ev = ev.originalEvent; /* added this line FIXME filipogg@gmail.com */
 [...]
 stop: function(ev, ui) {
 var ev = ev.originalEvent; /* added this line FIXME filipogg@gmail.com */
 [...]
}

function HoverListener(coordinateGrid) {
 [...]
 function mouse(ev) {
   var ev = ev.originalEvent; /* added this line FIXME filipogg@gmail.com*/
   [...]
 }
 [...]
}


fullcalendar.js
121 KB   View   Download
Nov 16, 2011
#3 MMaz...@gmail.com
I can confirm the issue with after jQuery Update to 1.7 filippos solution. works like a charm.
Nov 17, 2011
#4 str...@gmail.com
10 points, works a treat with 1.7
Nov 17, 2011
#6 m...@forrestzeisler.com
implemented the fix and it worked. Thanks filippos!
Nov 19, 2011
Project Member #7 adamrs...@gmail.com
 Issue 1172  has been merged into this issue.
Dec 8, 2011
#8 ruby-cor...@marc-andre.ca
Got burned by this issue too... I'll get the source from github, but how about an official release of full-calendar? Thanks!
Dec 12, 2011
#9 famousin...@gmail.com
The issue is caused by a change in the regular expression which is used to normalize 'mouse event properties' in the Event object: https://github.com/jquery/jquery/blob/master/src/event.js#L7

Dragging an event in fullcalendar binds a 'drag' event in HoverListener::start(), and that doesn't match the regexp in jQuery, so the pageX/Y coordinates are not copied to the 'root' of the Event object.

(fullcalendar.js line 4083)
hoverListener.start([...], ev, 'drag'); 

(fullcalendar.js line 5143)
t.start = function(_change, ev, _bindType) {
        change = _change;
        firstCell = cell = null;
	coordinateGrid.build();
	mouse(ev);
	bindType = _bindType || 'mousemove';
	$(document).bind(bindType, mouse);
};

Solution of filippos works, but I'm not sure if this will work in all browsers, as jQuery does the normalizing for keeping browser consistency.

An other solution is to always use 'mousemove' instead of 'drag' as the event type.
Dec 21, 2011
#10 billd...@gmail.com
Any word on a official release with a fix for this?
Dec 21, 2011
#11 jan.tova...@gmail.com
It may appear that filippos fix works but Its not exactly whats needed in global. It may solve problems with drag&drop but an error appears in IE8 with selection, apparently IE8 has some issues with using ev.originalEvent for triggering selection handler. However, as famousin said, using 'mousemove' instead of 'drag' solves all problems, at least I tried it and both, d&d and selection, work as charm (tested in newest versions of Chrome, FF, Opera, Safari and IE8).
Jan 9, 2012
Project Member #12 adamrs...@gmail.com
 Issue 1144  has been merged into this issue.
Feb 6, 2012
#13 ryan.bl...@gmail.com
Jan and Famousin, is there anyway that you can attach your .js file for this? I'm not sure where to replace the 'drag' with the 'mousemove' all are. I tried to make the updates that famousin made but it still doesn't work in IE so I'm obviously missing something. Thanks for the help.
Feb 6, 2012
Project Member #14 adamrs...@gmail.com
there is an official release for this fix: v1.5.3
http://arshaw.com/fullcalendar/download/
thanks for the patience
Status: Fixed
Aug 14, 2012
#15 prodigy....@gmail.com
Doesn't*
Oct 11, 2012
#16 andraz.u...@gmail.com
It is broken in the latest version, but a very simple fix by comment #9 works:

Search for 'drag'
Replace all 3 with 'mousemove'

Problem solved.
Apr 3, 2013
#17 Thomas.S...@gmail.com
Hi everybody, i have the same problem, i created a calendar on a simple web page and i'm trying to put it on my website. I use thoses files : 
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui/js/jquery-ui-1.8.16.custom.min.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.1.0.min.js"></script> 
and the fullcalendar.js. The drag and drop doesn't work so i tried to fix it by replacing "drag" by "mousemove" but it's still not working....Anybody could help me?
Thanks
Aug 13, 2013
Project Member #18 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Released
Labels: Type-Bug