Vertical sort is broken on Firefox 134
**Describe the bug**
When trying to reorder items in a vertical collection on Firefox 134, the selected item remains at its original position once dropped
**To Reproduce**
Steps to reproduce the behavior:
1. Go to the Ember Sortable Demo with Firefox 134
2. Try to reorder the Zero item between Two and Three
3. See error
**Expected behavior**
Zero can be positioned between Two and Three
**Screenshots**
<img width="569" alt="Screenshot 2025-01-10 at 2 45 22 PM" src="https://github.com/user-attachments/assets/d6604ca3-5695-4f72-af59-ab50c3fdd81e" />
Notice how there is no space to drop the selected item
**Additional context**
We tracked down the root cause and it's linked to a change of behavior in Firefox 134. We opened an issue in [Bugzilla](https://bugzilla.mozilla.org/show_bug.cgi?id=1941066)
`getComputedStyle` returns a single length when horizontal and vertical have the same value on Firefox 134, no any other browser or older Firefox version. Because of this, `getBorderSpacing` (addon/src/utils/css-calculation.ts) returns `undefined` as `vertical` value. The `height` of a sortable item ends up being `NaN`.
We have a fix available if you're interested https://github.com/yapplabs/ember-sortable/commit/c4e04e9e92213b0fa72a613c2b7e9d3a7f5e92af
关闭于 2025-01-13 1 条评论