Skip to content

Conversation

Kuuuube
Copy link
Contributor

@Kuuuube Kuuuube commented Oct 3, 2025

Small qol feature. I triple click on textboxes a lot and it's a bit jarring to be unable to do this in osu.

If desirable, I could implement this as a whole different event like DoubleClickEvent but I can't think of a use case outside of TextBox so I'm not sure that's worth it. Tried to follow the existing project structure as closely as I could.

Closes #4974

@Joehuu
Copy link
Member

Joehuu commented Oct 3, 2025

If desirable, I could implement this as a whole different event like DoubleClickEvent but I can't think of a use case outside of TextBox so I'm not sure that's worth it. Tried to follow the existing project structure as closely as I could.

The past attempt in #4975 did that and wasn't accepted.

This also closes #4974 (can't edit OP).

@Kuuuube
Copy link
Contributor Author

Kuuuube commented Oct 3, 2025

Issue linked in OP. Thanks for pointing that out.

Copy link
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs tests. Not willing to review until there's tests.

@pull-request-size pull-request-size bot added size/M and removed size/S labels Oct 3, 2025
@Kuuuube
Copy link
Contributor Author

Kuuuube commented Oct 3, 2025

Added tests for triple click selecting all and a triple click that is too slow to select.

Copy link
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how to feel about the following behaviour:

Screen.Recording.2025-10-07.at.08.52.14.mov

For reference macOS stops changing the selection after the third click and I think that'd be a better behaviour here too.

@Kuuuube
Copy link
Contributor Author

Kuuuube commented Oct 7, 2025

For reference macOS stops changing the selection after the third click and I think that'd be a better behaviour here too.

If you want it to work that way here, I won't fight you over it. I have no strong opinions here. But consider that almost everything else does allow the selection to change (testing of various programs on Windows and Linux):

untitled.mp4

The most common behavior appears to be select all -> deselect though select all -> select word is not uncommon either and can be seen in Qt (the Kate example) and Windows system ui.

(also small behavior change with 95b39dc for dragging, everything I tested this with did not allow text selection to change when dragging while a triple click is ongoing so that's added now)

@bdach
Copy link
Collaborator

bdach commented Oct 8, 2025

(also small behavior change with 95b39dc for dragging, everything I tested this with did not allow text selection to change when dragging while a triple click is ongoing so that's added now)

Please add a test case for this.

@Kuuuube
Copy link
Contributor Author

Kuuuube commented Oct 8, 2025

Test added.

Copy link
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no real remaining concerns from me I guess

@peppy maybe check that you're OK with the UX side of this

@bdach bdach requested a review from peppy October 10, 2025 10:23
@bdach bdach added the area:UI label Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to triple-click on TextBox to select all text

3 participants