Skip to content
Snippets Groups Projects
Verified Commit ce9604c4 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3420499 by catch: [jQuery 4] position.js uses deprecated function $.isWindow()

parent 99804f40
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@
offset: { top: 0, left: 0 },
};
}
if ($.isWindow(raw)) {
if (!!raw && raw === raw.window) {
return {
width: elem.width(),
height: elem.height(),
......@@ -346,7 +346,8 @@
},
getWithinInfo(element) {
const withinElement = $(element || window);
const isWindow = $.isWindow(withinElement[0]);
const isWindow =
!!withinElement[0] && withinElement[0] === withinElement[0].window;
const isDocument = !!withinElement[0] && withinElement[0].nodeType === 9;
const hasOffset = !isWindow && !isDocument;
return {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment