Skip to content

The annotation selection cannot be discarded once at least a single character got selected ⚠️ #139

@oleksandr-danylchenko

Description

@oleksandr-danylchenko

Issue

Once you start selecting the text either by mouse or keyboard, you cannot cancel it by collapsing the selection range.

Mouse

selection_loop.mp4

The mouse selection dispatches the selectstart event only once and after that, only the selectionchange until you release. During that time you're stuck in "at least 1-char selection limbo", and the rendered highlight won't get dismissed

Keyboard

keyboard_selection_loop.mp4

The keyboard selection dispatches the distinct selectstart event each time the previous selection range becomes collapsed. So each time you switch the selection direction, a new leftover annotation gets saved. Which is even more annoying than the mouse-limbo 💀

Suggested Changes

We should track the moment when the previously populated selection range collapses. That should signify the selection cancellation. Then, such leftover annotations can be deleted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions