Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text embedded in web page previews cannot be selected #27016

Closed
bb010g opened this issue Oct 31, 2023 · 4 comments
Closed

Text embedded in web page previews cannot be selected #27016

bb010g opened this issue Oct 31, 2023 · 4 comments
Labels

Comments

@bb010g
Copy link

bb010g commented Oct 31, 2023

Steps to reproduce

  1. Send a message with a web page as its media, e.g. https://youtu.be/dQw4w9WgXcQ.
  2. Attempt to select any of the message's web page view's text.

Expected behaviour

By clicking & dragging, text can be selected. Perhaps the alt modifier key must be held during this process to prevent opening the link (a convention followed by Firefox, Chrome, and TDesktop itself for message body text).

Actual behaviour

Clicking anywhere on the web page view's text opens the link. Dragging from anywhere on the web page view's text starts a drag action for the link target, as if dragging from the body's link. Holding alt changes neither of these behaviors.

Dragging from the body's text into the web page view's text selects both the body's text and the web page view's text, as in TDesktop before v4.11.0. Dragging from this selection, on the web page view's text, drags the selection content, as if dragging from the selection on the body's text. Holding alt does not change this behavior.

Operating system

Windows 11 Pro 22H2 (x86_64)

Version of Telegram Desktop

v4.11.1

Installation source

Static binary from official website

Crash ID

No response

Logs

No response

Extra information

I suspect this was introduced through a combination of f8d5a8a#diff-e9718579cda095d4fd006f5ae0e1ae39c08c3dc0b7b3d7343b0f67654e88e629R718-R720 and 3a84c6a#diff-e9718579cda095d4fd006f5ae0e1ae39c08c3dc0b7b3d7343b0f67654e88e629L718.

@bb010g bb010g added the bug label Oct 31, 2023
@Aokromes
Copy link
Collaborator

Aokromes commented Nov 1, 2023

@Aokromes Aokromes closed this as completed Nov 1, 2023
@bb010g
Copy link
Author

bb010g commented Nov 2, 2023

This was fixed by 728ed02, specifically. Thank you!

@enchained
Copy link

After the fix it feels much clunkier compared to how it was before all the changes. Now you can not double click to select a word or triple click for a paragraph. Now you have to be very careful to not accidentally click anywhere during the text selection, since it will lead to the link opening. The whole link area also highlights when you select the text, which I find distracting.

It feels like Telegram rolled out a lot of features recently without a proper accessibility testing (I'm talking about the original mobile implementation - you still can't even select the text there)

@john-preston
Copy link
Member

@enchained Well, the new links preview implementation wasn't supposed to have the text selection at all, I've just added it on top.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants