ruffle
ruffle copied to clipboard
text: Implement double/triple click selection
Fixes https://github.com/ruffle-rs/ruffle/issues/14996, progresses https://github.com/ruffle-rs/ruffle/issues/1891.
This PR implements selecting words by double-clicking and selecting lines by triple-clicking. It also includes support for selecting words and lines while dragging.
A test is added to verify this behavior. Example use cases covered by this test:
- selecting characters,
- selecting words by double-clicking,
- selecting multiple words by double-clicking and dragging,
- selecting lines by triple-clicking,
- selecting multiple lines by triple-clicking and dragging,
- double-clicking at word boundaries,
- double-clicking between spaces,
- changing the underlying text while clicking and dragging,
- trying to select while the text field is not selectable.