fix reported bugs (#140)

* fix: slash menu doesn't work

* fix: #2586 Down arrow skips one line

* fix: #2587 Capitalize the first letters
This commit is contained in:
Lucas.Xu 2023-05-29 15:59:42 +08:00 • committed by GitHub
commit 0f9c453361
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 21 deletions

View file

@ -2,7 +2,7 @@
"@@locale": "en", "@@locale": "en",
"bold": "Bold", "bold": "Bold",
"@bold": {}, "@bold": {},
"bulletedList": "Bulleted List", "bulletedList": "Bulleted list",
"@bulletedList": {}, "@bulletedList": {},
"checkbox": "Checkbox", "checkbox": "Checkbox",
"@checkbox": {}, "@checkbox": {},
@ -24,7 +24,7 @@
"@italic": {}, "@italic": {},
"link": "Link", "link": "Link",
"@link": {}, "@link": {},
"numberedList": "Numbered List", "numberedList": "Numbered list",
"@numberedList": {}, "@numberedList": {},
"quote": "Quote", "quote": "Quote",
"@quote": {}, "@quote": {},
@ -92,12 +92,12 @@
"lightLightTint7": "Green", "lightLightTint7": "Green",
"lightLightTint8": "Aqua", "lightLightTint8": "Aqua",
"lightLightTint9": "Blue", "lightLightTint9": "Blue",
"textColor": "text color", "textColor": "Text color",
"addYourLink": "add your link", "addYourLink": "Add your link",
"openLink": "open link", "openLink": "Open link",
"copyLink": "copy link", "copyLink": "Copy link",
"removeLink": "remove link", "removeLink": "Remove link",
"highlightColor": "highlight color", "highlightColor": "Highlight color",
"clearHighlightColor": "clear highlight color", "clearHighlightColor": "clear highlight color",
"customColor": "custom color", "customColor": "custom color",
"hexValue": "hex value", "hexValue": "hex value",

View file

@ -227,8 +227,8 @@ class KeyboardServiceWidgetState extends State<KeyboardServiceWidget>
); );
// clear the selection when the focus is lost. // clear the selection when the focus is lost.
if (!focusNode.hasFocus) { // if (!focusNode.hasFocus) {
editorState.selection = null; // editorState.selection = null;
} // }
} }
} }

View file

@ -80,14 +80,14 @@ extension PositionExtension on Position {
); );
offset = upwards offset = upwards
? rect.topRight.translate(0, -rect.height) ? rect.topRight.translate(0, -rect.height)
: rect.bottomRight.translate(0, rect.height); : rect.centerRight.translate(0, rect.height);
} else { } else {
final rect = rects.reduce( final rect = rects.reduce(
(current, next) => current.top <= next.top ? current : next, (current, next) => current.top <= next.top ? current : next,
); );
offset = upwards offset = upwards
? rect.topLeft.translate(0, -rect.height) ? rect.topLeft.translate(0, -rect.height)
: rect.bottomLeft.translate(0, rect.height); : rect.centerLeft.translate(0, rect.height);
} }
return editorState.service.selectionService.getPositionInOffset(offset); return editorState.service.selectionService.getPositionInOffset(offset);

View file

@ -64,7 +64,7 @@ class AppFlowyEditorLocalizations {
/// `Bulleted List` /// `Bulleted List`
String get bulletedList { String get bulletedList {
return Intl.message( return Intl.message(
'Bulleted List', 'Bulleted list',
name: 'bulletedList', name: 'bulletedList',
desc: '', desc: '',
args: [], args: [],
@ -174,7 +174,7 @@ class AppFlowyEditorLocalizations {
/// `Numbered List` /// `Numbered List`
String get numberedList { String get numberedList {
return Intl.message( return Intl.message(
'Numbered List', 'Numbered list',
name: 'numberedList', name: 'numberedList',
desc: '', desc: '',
args: [], args: [],
@ -604,7 +604,7 @@ class AppFlowyEditorLocalizations {
/// `text color` /// `text color`
String get textColor { String get textColor {
return Intl.message( return Intl.message(
'text color', 'Text color',
name: 'textColor', name: 'textColor',
desc: '', desc: '',
args: [], args: [],
@ -614,7 +614,7 @@ class AppFlowyEditorLocalizations {
/// `add your link` /// `add your link`
String get addYourLink { String get addYourLink {
return Intl.message( return Intl.message(
'add your link', 'Add your link',
name: 'addYourLink', name: 'addYourLink',
desc: '', desc: '',
args: [], args: [],
@ -624,7 +624,7 @@ class AppFlowyEditorLocalizations {
/// `open link` /// `open link`
String get openLink { String get openLink {
return Intl.message( return Intl.message(
'open link', 'Open link',
name: 'openLink', name: 'openLink',
desc: '', desc: '',
args: [], args: [],
@ -634,7 +634,7 @@ class AppFlowyEditorLocalizations {
/// `copy link` /// `copy link`
String get copyLink { String get copyLink {
return Intl.message( return Intl.message(
'copy link', 'Copy link',
name: 'copyLink', name: 'copyLink',
desc: '', desc: '',
args: [], args: [],
@ -644,7 +644,7 @@ class AppFlowyEditorLocalizations {
/// `remove link` /// `remove link`
String get removeLink { String get removeLink {
return Intl.message( return Intl.message(
'remove link', 'Remove link',
name: 'removeLink', name: 'removeLink',
desc: '', desc: '',
args: [], args: [],
@ -654,7 +654,7 @@ class AppFlowyEditorLocalizations {
/// `highlight color` /// `highlight color`
String get highlightColor { String get highlightColor {
return Intl.message( return Intl.message(
'highlight color', 'Highlight color',
name: 'highlightColor', name: 'highlightColor',
desc: '', desc: '',
args: [], args: [],