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: context menu behavior in mouse, desktop env #1976

Merged
merged 2 commits into from
Jul 5, 2024
Merged

fix: context menu behavior in mouse, desktop env #1976

merged 2 commits into from
Jul 5, 2024

Conversation

n7484443
Copy link
Contributor

@n7484443 n7484443 commented Jul 5, 2024

Description

When drag or select text with the mouse in a desktop environment, a context menu always appears.
The typical behavior in a desktop environment is that it does not appear when dragging/selecting, but when additionally press the right-click button.

Related Issues

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I titled the PR using Conventional Commits.
  • I did not modify the CHANGELOG.md nor the package version in pubspec.yaml files.
  • All existing and new tests are passing.
  • I have run the commands in ./scripts/before_push.sh and it all passed successfully

Breaking Change

Does your PR require developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
  • No, this is not a breaking change.

@singerdmx singerdmx merged commit eb60e27 into singerdmx:master Jul 5, 2024
2 checks passed
@@ -167,7 +169,7 @@ class EditorTextSelectionGestureDetectorBuilder {
null,
SelectionChangedCause.forcePress,
);
if (shouldShowSelectionToolbar) {
if (shouldShowSelectionToolbar && !requiresAdditionalActionForToolbar) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We might consider extractring this check into its own function or getter as it's become a bit harder to maintain. In the future, someone might add new features or bugs to fix and update some of the checks and forget the others.

And we also don't have tests to cover those cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable context menu after selection for desktop platform
3 participants