Skip to content

Commit 9477f00

Browse files
committed
fix: selection menu show position
1 parent e426aa5 commit 9477f00

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

frontend/app_flowy/packages/appflowy_editor/lib/src/render/image/image_upload_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class _ImageUploadMenuState extends State<ImageUploadMenu> {
9898
color: Colors.black.withOpacity(0.1),
9999
),
100100
],
101-
borderRadius: BorderRadius.circular(6.0),
101+
// borderRadius: BorderRadius.circular(6.0),
102102
),
103103
child: Column(
104104
crossAxisAlignment: CrossAxisAlignment.start,

frontend/app_flowy/packages/appflowy_editor/lib/src/render/selection_menu/selection_menu_service.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class SelectionMenu implements SelectionMenuService {
6060
// but the coordinates of overlay are not properly converted currently.
6161
// Just subtract the padding here as a result.
6262
const menuHeight = 200.0;
63-
const menuOffset = Offset(10, 10);
63+
const menuOffset = Offset(0, 10);
6464
final editorOffset =
6565
editorState.renderBox?.localToGlobal(Offset.zero) ?? Offset.zero;
6666
final editorHeight = editorState.renderBox!.size.height;
@@ -81,7 +81,8 @@ class SelectionMenu implements SelectionMenuService {
8181
_selectionMenuEntry = OverlayEntry(builder: (context) {
8282
return Positioned(
8383
top: showBelow ? offset.dy : null,
84-
bottom: showBelow ? null : editorHeight - offset.dy,
84+
bottom:
85+
showBelow ? null : MediaQuery.of(context).size.height - offset.dy,
8586
left: offset.dx,
8687
child: SelectionMenuWidget(
8788
items: [

0 commit comments

Comments
 (0)