Inconsistent Firefox selection with rowspan in td element
nlulic opened this issue · comments
Description
I've been working on a table plugin for Slate that is intended to support colspan and rowspan attributes. I've observed an inconsistency in the selection API on Firefox when a td with a rowspan attribute is included in the selection.
This leads to incorrect cells being designated as anchor and focus nodes, as seen in the GIF below.
Recording
Green: anchor
Light green: focus
Sandbox
https://stackblitz.com/edit/stackblitz-starters-zbtxfm?file=src%2FApp.tsx
Steps
To reproduce the behavior:
- Open the Stackblitz example in Firefox.
- Select a range from a td below the cell with a rowspan (e.g., 5) to the cell with the rowspan attribute (cell 3).
- the anchor and focus nodes do not match to the start and end of your range selection.
Expectation
In Firefox, the selection behavior should align with that of Chrome, appointing the start and end nodes as the anchor and focus nodes.
Environment
- slate: 0.100.0
- slate-react: 0.100.1
- Operating System: Fedora Linux 38 (Workstation Edition)
- Browser: Firefox