reedsy / quill-cursors

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

Whole paragraph highlights look weird #35

Closed alecgibson closed 5 years ago

alecgibson commented 5 years ago

When selecting an entire paragraph, the p element gets included in the selection, which causes a large block overlap. This looks a bit odd, and isn't necessary, since the text nodes within the paragraph have been selected already.

Screen Shot 2019-06-28 at 17 31 27
alecgibson commented 5 years ago

Note that this is because of the inconsistencies in getClientRects behaviour. Firefox will only display the outer box (not each of the lines), but other browsers will also show a box for each line.

Ideally, we'd show each line (even in Firefox), but we should take care to not break behaviour for things like image embeds.