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

[BUG] - long press without selection opens the toolbar AND closes it again immidiately #2481

Open
quaaantumdev opened this issue Dec 29, 2024 · 0 comments · May be fixed by #2552
Open

[BUG] - long press without selection opens the toolbar AND closes it again immidiately #2481

quaaantumdev opened this issue Dec 29, 2024 · 0 comments · May be fixed by #2552
Assignees
Labels
area_supereditor Pertains to SuperEditor bounty_junior f:superlist Funded by Superlist time:2 type_bug Something isn't working

Comments

@quaaantumdev
Copy link

Package Version
super_editor, GitHub, stable

User Info
individual

To Reproduce
Steps to reproduce the behavior:

  1. Run the example app
  2. Long press anywhere (with the intent of inserting someting, so without an expanded selection)
  3. See the toolbar to insert someting from the clipboard appear and immidiately close again

Minimal Reproduction Code
Simply use the example app, no change needed.

Actual behavior
The Toolbar opens and closes, making it impossible to tap one of the buttons

Expected behavior
The long-press should open the toolbar and only close it when taping somewhere else again. That allows actually pressing a button on the toolbar.

Platform
Android, did not investigate others, may be relevant there too.

Flutter version
Flutter 3.27.1, Dart 3.6.0

Screenshots

See the video:

long_press_issue.mp4

Additional context

At first glance, it looks like the following like is incorrect and should be removed to fix this:

_showAndHideEditingControlsAfterTapSelection(didTapOnExistingSelection: false);

with more context visible, the following line seems to be incorrect, which is also what i did in the video:

  void _onTapUp(TapUpDetails details) {
    // Stop waiting for a long-press to start.
    _tapDownLongPressTimer?.cancel();

    // Cancel any on-going long-press.
    if (_isLongPressInProgress) {
      _longPressStrategy = null;
      _magnifierGlobalOffset.value = null;
      _showAndHideEditingControlsAfterTapSelection(didTapOnExistingSelection: false); // ← * SEEMS INCORRECT HERE *
      return;
    }
@quaaantumdev quaaantumdev added the type_bug Something isn't working label Dec 29, 2024
quaaantumdev added a commit to quaaantumdev/super_editor that referenced this issue Dec 29, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@matthew-carroll matthew-carroll added area_supereditor Pertains to SuperEditor bounty_junior f:superlist Funded by Superlist time:2 labels Jan 15, 2025
angelosilvestre added a commit that referenced this issue Jan 26, 2025
… press (Resolves #2481)
quaaantumdev pushed a commit to quaaantumdev/super_editor that referenced this issue Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area_supereditor Pertains to SuperEditor bounty_junior f:superlist Funded by Superlist time:2 type_bug Something isn't working
Projects
None yet
3 participants