Wednesday, April 17, 2024
1 change
Resolved issues and error corrections
This fix resolves a critical issue where Safari 16.5 crashes when customers view their shopping cart on the website. The problem was caused by a circular color reference in the horizontal line styling that Safari couldn't handle. The fix simplifies the color styling to prevent the crash while maintaining the same visual appearance.
Original PR description
__Current behavior before commit:__ The `color` attribute of `hr` is set to `$hr-color`[1]. `$hr-color` is equal to `$border-color`[2] which itself is equal to `--o-border-color`[3]. Finally…
__Current behavior before commit:__ The `color` attribute of `hr` is set to `$hr-color`[1]. `$hr-color` is equal to `$border-color`[2] which itself is equal to `--o-border-color`[3]. Finally `--o-border-color` is set using `fade-currentColor()`[4] which uses the `color-mix` css function on `currentColor`[5]. In short, the `color` of `hr` depends on itself. This creates a circular reference that makes Safari 16.5 crash. This bug is caused by WebKit. There seems to be a commit to fix[6] this bug but it looks like it was not backported to this version of Safari. __Description of the fix:__ Set `$hr-color` to a fixed value by introducing `--o-hr-color` which is set to the same value of the already existing fallback of `--o-border-color`. __Steps to reproduce the issue on runbot:__ 1. Go to the website shop using Safari 16.5 2. Add an item to the cart 3. Open the cart view 4. Safari crashes opw-3806725 [1]: https://github.com/odoo/odoo/blob/1154556/addons/web/static/lib/bootstrap/scss/_reboot.scss#L71 [2]: https://github.com/odoo/odoo/blob/1154556/addons/website/static/src/scss/bootstrap_overridden.scss#L333 [3]: https://github.com/odoo/odoo/blob/1154556/addons/website/static/src/scss/bootstrap_overridden.scss#L91 [4]: https://github.com/odoo/odoo/blob/1154556/addons/website/static/src/scss/website.scss#L35 [5]: https://github.com/odoo/odoo/blob/1154556/addons/website/static/src/scss/primary_variables.scss#L2219 [6]: https://github.com/WebKit/WebKit/commit/0d0b884