Fix the animation of dialogs in Safari
authorAlexander Ebert <ebert@woltlab.com>
Sat, 20 May 2023 16:53:52 +0000 (18:53 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 20 May 2023 16:53:52 +0000 (18:53 +0200)
commitc5a889cdf123ab9380a22240ccad381a3d94fa0f
tree88eeea2a16fe9c9bf3cea438ff8bfaa72c8a8f3c
parent62b42b362b749c86cc77ceab48ef79ed09cbed57
Fix the animation of dialogs in Safari

Safari executes the resize observer asynchronously, causing the offset to be not calculated when the dialog was just added to the DOM.

In addition the `contentBoxSize` was observed to report the width of the element without any borders. We are able to simplify the code by querying the client rect instead which reports the proper width.

Fixes #5519
ts/WoltLabSuite/Core/Ui/Dialog.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js
wcfsetup/install/files/style/ui/dialog.scss