nextcloud / text

đź“‘ Collaborative document editing using Markdown
GNU Affero General Public License v3.0
552 stars 91 forks source link

second user cursor deletes text, prevents newline and inserts username as text #5103

Open kolAflash opened 11 months ago

kolAflash commented 11 months ago

Describe the bug @juliushaertl This is a follow up for regressions since >= 26.0, already described in #5102 and #4100

Since Nextcloud 26.0, there is strange behaviour if a user cursor is present.

 

To Reproduce A webbrowser (Firefox-120.0.1 on Debian-12) is having the file opened simultaneously. But I'm doing nothing on the webbrowser client. It just has the file opened.

Please see the attached videos for behaviour and reproduction. (recorded on Android)
Mind the Return and Backspace keys flashing when I press them.

VIDEOS https://github.com/nextcloud/text/assets/3355089/310995e5-b0eb-4efa-bceb-10b47388fc3b https://github.com/nextcloud/text/assets/3355089/70b146fe-9525-4245-b480-21fbeafaca0a

 

Expected behavior Text should not be deleted on pressing Return. (related #1927)
Adding a newline (Return) at a user cursor position should work.
Username should not be added as text when pressing backspace at a user cursor position.

(slightly related #5102)

 

Server details: Tested with two different servers.

 

Client details: Tested with two different Android devices.

jospoortvliet commented 8 months ago

Odd. This is specific to .txt files, doesn't happen in MD files?

I see you can only make 1 free line, on Text on iOS in a .txt file, but the other stuff doesn't happen. This might also be keyboard/autocomplete doing weirdo things I guess.

kolAflash commented 8 months ago

MD files behave buggy in a slightly different way.

video with OpenBoard and a MD file on a Fairephone 3 (e/OS/, AOSP Keyboard) https://github.com/nextcloud/text/assets/3355089/682d8f31-045d-49e7-9c99-5cf733f94961

Same test result on the Fairphone 3 (e/OS/) and the Nokia 1 (TA-1060).

 

Fairphone 3 (e/OS/) uses "AOSP Keyboard".
Switching to Hacker's Keyboard seems to workaround the issue.

Google Pixel 4a uses OpenBoard.
Nokia 1 uses OpenBoard too.

Using Google GBoard changes the behavior slightly. Newlines work with GBoard. Deleting a line (backspace) with another user cursor does only work in MD files, but not in TXT files.

 

So the behavior with "AOSP Keyboard" and OpenBoard is broken. GBoard partly works. And only "Hacker's Keyboard" works fine.

kolAflash commented 5 months ago

@jospoortvliet
Find the answers to your questions in my previous comment.

 

I'm getting really annoyed with this.
Since Nextcloud-26 came out about one year ago the text app is broken in many ways!
Especially on Android!

Unintentionally deleted text / data loss happen again and again since Nextcloud >= 26.

 

I invested a lot of time in exactly describing those bugs. But still the text app suffers from a lot of problems which didn't exist in Nextcloud-25.

4100 user cursors trigger different bugs (2023-05)

5102 Android app text editor doesn't write changes to server filesystem

Please feel free to ask me for anything I can provide.
(I'm a software developer myself and if I would have more knowledge of the Nextcloud source, I'd fix this mess myself. I just don't have enough time to properly work into the Nextcloud source so I can fix complicated synchronization issues.)

Here's another bug video I created when my shopping list TXT file was smashed today.
(Android-App-3.29.0, Nextcloud-Server-28.0.5, AOSP keyboard, eOS / Android-12)
https://github.com/nextcloud/text/assets/3355089/d1b4cc7a-a900-477a-93b3-8cd16040afbb

 

I've experienced those problems with multiple servers and on multiple end devices. So I'm very likely not the only one suffering from it. And having the constant risk of data loss (unintentionally deleted text, unsaved files) is a really bad thing for the user!

The people who introduced the changes between Nextcloud 25 and 26 (apparently mostly adding user cursors) should have a look at the resulting regressions.
And if no one has the resources to fix this, I suggest reverting changes which added the users cursors feature.
Those user cursors are really not worth the trouble!!!

 

Kind regards and thanks for your work,
kolAflash

RoWo-DS commented 1 month ago

We experience random text deletion and deactivated the text app for that reason. We use

It would be great, if someone could fix that problem or recommend another app, which doesn't randomly delete text.