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

fix: Fix bug that caused text to be selected when long-pressing in the workspace on a touch device. #8670

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

gonfunko
Copy link
Contributor

The basics

The details

Resolves

Proposed Changes

This PR sets user-select: none; on the entire injection div, which prevents users from selecting text. We had already had this in place on block text, menus, and toolbox categories, but since e.g. the workspace and blocks themselves did not, long-pressing those items on mobile would also select text (often outside of Blockly) in addition to presenting the context menu. I repro'd this and confirmed the fix on an iPad, but I strongly suspect the two linked issues are the same thing; if folks with an Android and/or ChromeOS touchscreen device could confirm this also resolves the issue there, that would be great, but I'm nearly certain this resolves the problem there as well.

Note that this does not prevent selecting text in text fields, either in blocks or comments. I verified this across Chrome, Safari and Firefox.

@gonfunko gonfunko requested a review from a team as a code owner November 22, 2024 23:20
@github-actions github-actions bot added the PR: fix Fixes a bug label Nov 22, 2024
@gonfunko gonfunko merged commit 24ab50d into google:develop Dec 3, 2024
7 checks passed
@gonfunko gonfunko deleted the text-selection branch December 3, 2024 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: fix Fixes a bug
Projects
None yet
2 participants