reedsy / quill-cursors

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

Flags can be cropped by parent containers and viewports #52

Closed alecgibson closed 4 years ago

alecgibson commented 4 years ago

First raised in https://github.com/reedsy/quill-cursors/pull/51

Screenshot 2020-01-23 at 14 43 08

Flags can be cut off in small containers and viewports. In general, we should attempt to catch these cases, and flip the flag. We will probably need to flip up-down and left-right, depending on the collisions we find.

We may also allow the consumer to provide a "container" element, against whose bounds we check the flag (presumably defaulting to <body>?).

Note that the Quill tooltip already addresses this issue, so perhaps we can read across that solution (or something very similar).

alecgibson commented 4 years ago

Fixed by https://github.com/reedsy/quill-cursors/pull/51