Skip to content

[web] Right click in SelectionArea incorrectly selects text (on Windows) #117561

@lsegal

Description

@lsegal

Steps to Reproduce

Right clicking in a SelectionArea in a Flutter web environment (using either web renderer) results in the word under the cursor being selected when nothing is selected. This differs from the standard browser behavior (at least on Chrome / Windows) and can inhibit the standard context menu from being displayed if the user happens to right click in the wrong area. Note that while this report is specific to web, this behavior also differs from standard Windows behavior for most applications; right click should not select text.

Video.mp4

Expected results:

No text should be selected when right clicking.

Actual results:

Text is selected.

Code sample

Wrap any widget in SelectionArea:

https://dartpad.dev/?id=c806dc92e4761b0ce3953f6cd198009a

Logs
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 3.7.0-1.2.pre, on Microsoft Windows [Version 10.0.22000.1335], locale en-US)
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.2)
[✓] Android Studio (version 2021.3)
[✓] VS Code, 64-bit edition (version 1.74.1)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

• No issues found!

Metadata

Metadata

Labels

P2Important issues not at the top of the work lista: mouseIssues related to using a mouse or mouse supportf: selectionSelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIsfound in release: 3.3Found to occur in 3.3found in release: 3.7Found to occur in 3.7frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyplatform-windowsBuilding on or for Windows specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions