diff --git a/app/assets/javascripts/app/lib/core/jquery-ui-1.11.4.js b/app/assets/javascripts/app/lib/core/jquery-ui-1.11.4.js index e82ee8f71..6002dc51f 100644 --- a/app/assets/javascripts/app/lib/core/jquery-ui-1.11.4.js +++ b/app/assets/javascripts/app/lib/core/jquery-ui-1.11.4.js @@ -1154,12 +1154,13 @@ $.position = { getWithinInfo: function( element ) { var withinElement = $( element || window ), isWindow = $.isWindow( withinElement[0] ), - isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9; + isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9, + hasOffset = !isWindow && !isDocument; return { element: withinElement, isWindow: isWindow, isDocument: isDocument, - offset: withinElement.offset() || { left: 0, top: 0 }, + offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 }, scrollLeft: withinElement.scrollLeft(), scrollTop: withinElement.scrollTop(),