Follow up - 296d402 - Maintenance: Upgrade jQuery to version 3.6.

This commit is contained in:
Bola Ahmed Buari 2022-02-07 18:07:32 +01:00
parent ffb958d22d
commit 98f789610a

View file

@ -1154,12 +1154,13 @@ $.position = {
getWithinInfo: function( element ) { getWithinInfo: function( element ) {
var withinElement = $( element || window ), var withinElement = $( element || window ),
isWindow = $.isWindow( withinElement[0] ), isWindow = $.isWindow( withinElement[0] ),
isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9; isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,
hasOffset = !isWindow && !isDocument;
return { return {
element: withinElement, element: withinElement,
isWindow: isWindow, isWindow: isWindow,
isDocument: isDocument, isDocument: isDocument,
offset: withinElement.offset() || { left: 0, top: 0 }, offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },
scrollLeft: withinElement.scrollLeft(), scrollLeft: withinElement.scrollLeft(),
scrollTop: withinElement.scrollTop(), scrollTop: withinElement.scrollTop(),