diff --git a/package.json b/package.json index ae96728c..b92b26b2 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "@emotion/react": "11.13.3", "@emotion/styled": "11.13.0", "@fontsource/roboto": "5.0.14", + "@juggle/resize-observer": "^3.4.0", "@loadable/component": "5.16.4", "@mui/icons-material": "6.0.2", "@mui/material": "6.0.2", diff --git a/src/index.tsx b/src/index.tsx index ba733b2c..09afa26a 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -6,6 +6,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +import '@/polyfill.manual'; import { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; import { App } from '@/App'; diff --git a/src/polyfill.manual.ts b/src/polyfill.manual.ts new file mode 100644 index 00000000..052356ac --- /dev/null +++ b/src/polyfill.manual.ts @@ -0,0 +1,11 @@ +/* + * Copyright (C) Contributors to the Suwayomi project + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + +import { ResizeObserver as JuggleResizeObserver } from '@juggle/resize-observer'; + +window.ResizeObserver ??= JuggleResizeObserver; diff --git a/yarn.lock b/yarn.lock index bc9cd851..65dc0aea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2659,6 +2659,11 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@juggle/resize-observer@^3.4.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.4.0.tgz#08d6c5e20cf7e4cc02fd181c4b0c225cd31dbb60" + integrity sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA== + "@kamilkisiela/fast-url-parser@^1.1.4": version "1.1.4" resolved "https://registry.yarnpkg.com/@kamilkisiela/fast-url-parser/-/fast-url-parser-1.1.4.tgz#9d68877a489107411b953c54ea65d0658b515809"