mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: unable to see the text of link menu in dark mode (#4239)
This commit is contained in:
parent
d57b61b213
commit
f5bfcdcb98
@ -79,8 +79,7 @@ class _MobileBottomSheetEditLinkWidgetState
|
||||
TextEditingController controller,
|
||||
String? hintText,
|
||||
) {
|
||||
return Container(
|
||||
color: Colors.white,
|
||||
return SizedBox(
|
||||
height: 48.0,
|
||||
child: FlowyTextField(
|
||||
controller: controller,
|
||||
|
@ -2,13 +2,13 @@ import 'package:appflowy/mobile/presentation/bottom_sheet/bottom_sheet.dart';
|
||||
import 'package:appflowy/mobile/presentation/bottom_sheet/bottom_sheet_edit_link_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void showEditLinkBottomSheet(
|
||||
Future<T?> showEditLinkBottomSheet<T>(
|
||||
BuildContext context,
|
||||
String text,
|
||||
String? href,
|
||||
void Function(BuildContext context, String text, String href) onEdit,
|
||||
) {
|
||||
showMobileBottomSheet(
|
||||
return showMobileBottomSheet(
|
||||
context,
|
||||
showHeader: false,
|
||||
builder: (context) {
|
||||
|
@ -128,7 +128,7 @@ class BlockItems extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
void _onLinkItemTap() {
|
||||
void _onLinkItemTap() async {
|
||||
final selection = editorState.selection;
|
||||
if (selection == null) {
|
||||
return;
|
||||
@ -139,6 +139,17 @@ class BlockItems extends StatelessWidget {
|
||||
if (context != null) {
|
||||
_closeKeyboard(selection);
|
||||
|
||||
// keep the selection
|
||||
editorState.updateSelectionWithReason(
|
||||
selection,
|
||||
extraInfo: {
|
||||
selectionExtraInfoDisableMobileToolbarKey: true,
|
||||
selectionExtraInfoDoNotAttachTextService: true,
|
||||
selectionExtraInfoDisableFloatingToolbar: true,
|
||||
},
|
||||
);
|
||||
keepEditorFocusNotifier.increase();
|
||||
|
||||
final text = editorState
|
||||
.getTextInSelection(
|
||||
selection,
|
||||
@ -148,7 +159,7 @@ class BlockItems extends StatelessWidget {
|
||||
AppFlowyRichTextKeys.href,
|
||||
selection,
|
||||
);
|
||||
showEditLinkBottomSheet(
|
||||
await showEditLinkBottomSheet(
|
||||
context,
|
||||
text,
|
||||
href,
|
||||
@ -160,9 +171,14 @@ class BlockItems extends StatelessWidget {
|
||||
newHref,
|
||||
selection: selection,
|
||||
);
|
||||
context.pop();
|
||||
context.pop(true);
|
||||
},
|
||||
);
|
||||
// re-open the keyboard again
|
||||
editorState.updateSelectionWithReason(
|
||||
selection,
|
||||
extraInfo: {},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,8 +44,8 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: "93a1b70"
|
||||
resolved-ref: "93a1b70858801583b5a7edb0b2c06308d7982054"
|
||||
ref: "15a3a50"
|
||||
resolved-ref: "15a3a5071ffdb002ffaefda9df343b6800844d8d"
|
||||
url: "https://github.com/AppFlowy-IO/appflowy-board.git"
|
||||
source: git
|
||||
version: "0.1.1"
|
||||
|
Loading…
Reference in New Issue
Block a user