reedsy / quill-cursors

A multi cursor module for Quill text editor.
MIT License
250 stars 53 forks source link

Selections are not necessarily added in order #29

Closed alecgibson closed 5 years ago

alecgibson commented 5 years ago

A selection is broken into multiple span elements. Sometimes, we may want to apply styling to these using :first-child and :last-child CSS selectors. However, the elements are not necessarily added in order (ie I'd expect the top line of a selection to be the first span in the DOM, and so on). This seems to work in order in Chrome by accident, but isn't necessarily the case eg in Firefox.

alecgibson commented 5 years ago

Looks like this is due to an upstream issue with RangeFix: https://github.com/edg2s/rangefix/issues/11