Closed JaySunSyn closed 8 years ago
Hi @JaySunSyn,
Managed to take a look today. The issue seems to boil down to how jQuery handles ShadowDom. The exact issue is discussed at length here. They seem to have fixed it in version 3.0 (released 6 days ago), but FullCalendar does not support it.
There is an issue opened for adding jQuery 3 support. As a workaround, you could patch jQuery (the problem is the contains
function, which reports that all elements are disconnected when inside ShadowDom):
jQuery.fn.extend( {
offset: function( options ) {
if ( arguments.length ) {
return options === undefined ?
this :
this.each( function( i ) {
jQuery.offset.setOffset( this, options, i );
} );
}
var docElem, win,
elem = this[ 0 ],
box = { top: 0, left: 0 },
doc = elem && elem.ownerDocument;
if ( !doc ) {
return;
}
docElem = doc.documentElement;
// Make sure it's not a disconnected DOM node
- if ( !jQuery.contains( docElem, elem ) ) {
- return box;
- }
box = elem.getBoundingClientRect();
win = getWindow( doc );
return {
top: box.top + win.pageYOffset - docElem.clientTop,
left: box.left + win.pageXOffset - docElem.clientLeft
};
},
Or you could just use Shady Dom.
@sorin-davidoi Thanks a ton for the answer and the patch. The patch works like a charm!
Thanks for this element!!
Do you know by any chance how to fix drag and select events?
e.g. with these options: