mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2026-03-24 12:56:59 +00:00
[GH-ISSUE #7854] [Bug] Dissapearing text when trying to change the text into Code - v0.8.9 #3447
Labels
No labels
2024
2025
2026
acct mgmt
AI
automation
bug
calendar
ci
CJK
cloud
code-block
collaboration
copy-paste
database
data migration
data sync
deploy
desktop
develop
develop
documentation
duplicate
editor
editor-plugin
emoji
export
files
flutter-only
follow-up
formula
good first issue for devs
good first issue for experienced devs
grid
hacktoberfest
HACKTOBERFEST-ACCEPTED
help wanted
i18n
icons
images
importer
improvements
infra
install
integrations
IR
kanban board
login
look and joy
mentorship
mobile
mobile
needs design
new feature
new feature
non-coding
notes
notifications
onboarding
organization
P0+
permission
platform-linux
platform-mac
platform-windows
plugins
program
pull-request
Q1 25
Q1 26
Q2 24
Q2 25
Q3 24
Q3 25
Q4 24
Q4 25
react
regression
rust
rust
Rust-only
Rust-only
Rust-starter
Rust-starter
self-hosted
shortcuts
side panel
slash-menu
sync v2
table
tablet
task
tauri
templates
tests
themes
translation
v0.5.6
v0.5.8
v0.5.9
v0.6.0
v0.6.1
v0.6.4
v0.6.7
v0.6.8
v0.7.1
v0.7.4
v0.7.4
v0.7.5
v0.7.6
v0.7.7
v0.7.8
v0.8.0
v0.8.4
v0.8.5
v0.8.9
web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AppFlowy-IO/AppFlowy#3447
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kappafon on GitHub (Apr 29, 2025).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/7854
Originally assigned to: @LucasXu0 on GitHub.
Bug Description
When I type a text and select it then press backtikc key three times, the expectation is to wrap the text into code block, instead the text is gone. Then I press Ctrl + Z to undo and get the text back.
But if I go to another page and come back to the first one. The empty code block is back and the text is gone.
How to Reproduce
Write a text and select the whole block, then type triple backticks fast ``` to turn it into a Code block
- Text dissapears.
Press Ctrl+Z to undo, to restore the text, and go to another document and come back here.
- The empty Code block is visible instead of the text.
Expected Behavior
Write a text and select the whole block, then type triple backticks fast ``` to turn it into a Code block
- Text is now inside the code block.
Press Ctrl+Z to undo, to restore the text, and go to another document and come back here.
- The text is still there and visible.
Operating System
Windows
AppFlowy Version(s)
v0.8.9
Screenshots
https://github.com/user-attachments/assets/44ea31d8-d45a-42dc-9042-9e64a2b47e7e
Additional Context
No response
@LucasXu0 commented on GitHub (Apr 30, 2025):
In my opinion, if you select the whole block, it means replacing the existing text with your input. If you want to convert the existing paragraph to a code block, you can put the cursor at the beginning of the sentence and press '`' three times.
https://github.com/user-attachments/assets/7d9f55ef-7248-45fb-9e94-c67d211bbcb4
@kappafon commented on GitHub (Apr 30, 2025):
@LucasXu0

Sure, that would also work for me. In general I have quite a lot of code snippets in my docs and it would be great if that was also a 'shortcut' next to this 'inline code' icon
But the editor bug where I undo something, leave the current page and come back is maybe a bigger issue for me.
I'm used to converting text to code snippets that way from using other editors so even if this is not expected for Appflowy I might slip from time to time, realize the mistake, undo, go work on other docs, meanwhile the text block is gone.
@LucasXu0 commented on GitHub (Apr 30, 2025):
@kappafon regarding the undo issue, I already have an idea to fix it. It may be related to the undoManager's debounce timer.
You can try the upcoming release (v0.9.0) to see if it's fixed on your end.
@kappafon commented on GitHub (May 3, 2025):
I can't reproduce the bug anymore on my side. Great work :)
Thanks!