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 doesn't show up when the first paragraph is empty #891

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
}

final String _debounceKey = 'show the toolbar';

void _clear() {
Debounce.cancel(_debounceKey);

Expand All @@ -185,9 +186,9 @@
if (rects.isEmpty) {
return;
}

final rect = _findSuitableRect(rects);
if (rect.isEmpty) {
// Empty is determined only if there is only one selection area
if (rects.length <= 1 && rect.isEmpty) {

Check warning on line 191 in lib/src/editor/toolbar/mobile/mobile_floating_toolbar/mobile_floating_toolbar.dart

View check run for this annotation

Codecov / codecov/patch

lib/src/editor/toolbar/mobile/mobile_floating_toolbar/mobile_floating_toolbar.dart#L191

Added line #L191 was not covered by tests
return;
}
_toolbarContainer = OverlayEntry(
Expand Down
Loading