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
Loading
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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 {