glushchenko / fsnotes

Notes manager for macOS/iOS
https://fsnot.es
MIT License
6.18k stars 453 forks source link

Pressing Enter Goes Back to Previous Line #1701

Open RainofTerra opened 4 months ago

RainofTerra commented 4 months ago

Description

I don't know why, but on one of Macs when I hit enter, the newline is created but the cursor goes back to the previous line. I've made sure my OS is up to date, as is FSNotes. I am assuming something is different about this Mac but I can't figure out what - I've closed all programs (including things in the background) except for FSNotes and it persists. The only thing I haven't tried is a new user profile. I've also reset caches in the app and reset settings, but that didn't change it. This doesn't occur in other editors (Pages, Sublime, VSCode, etc.)

To Reproduce

  1. Go to a note, or create a note.
  2. Try to hit enter to make a new line
  3. Cursor goes to back to the end of the previous line right away. If I down arrow, the new line is there, and the cursor stays.

Expected behavior

A newline is created and stays and the cursor stays there.

FSNotes version

6.6.8

macOS/iOS version

macOS 14.3.1

Additional context

My notes are stored in Dropbox, but that is true on all of my macs and this is the only one this happens on.

glushchenko commented 4 months ago

Fixed in 6.6.9

PeterGumball commented 3 months ago

@glushchenko I can reproduce this issue with 6.7.0 (618) under macOS 14.3.1

RainofTerra commented 3 months ago

@glushchenko I also can still reproduce this on 6.7.0 under macOS 14.3.1 (but same as before, on only one of two macs I use). Should I reopen as a different issue? Also happy to provide logs if I can enable debugging or something.

glushchenko commented 3 months ago

@RainofTerra I don't know how to reproduce it, much less fix it.

RainofTerra commented 3 months ago

@RainofTerra I don't know how to reproduce it, much less fix it.

I'm going to try to see if I can build/debug locally and get back to you with more info

glushchenko commented 3 months ago

@RainofTerra that would be great.

webuniverseio commented 1 month ago

Happens on 6.8.0 for me

gpinnadhari commented 1 month ago

Also happens to me, from several months/versions. Currently on 6.8.0

svladek commented 2 weeks ago

1734 still an issue in 6.8.0 and 6.8.1

glushchenko commented 1 week ago

Please check test build: FSNotes_6.8.2.zip

svladek commented 1 week ago

Please check test build: FSNotes_6.8.2.zip

Still happens , didn't noticed any change of the behavior and verified that I am using Version 6.8.2 (629) . So it seems that starts to happen if I go to the next page of the note. I mean if I am on the first visible page and I type something it's fine but as soon as I insert multiple page breaks it starts happening on the second scrolled page.

PeterGumball commented 1 week ago

Please check test build: FSNotes_6.8.2.zip

The test build works for me :) Running on macOS Sonoma 14.5 (23F79)

svladek commented 1 week ago

https://github.com/glushchenko/fsnotes/assets/8627833/9e03bd23-e50d-46cb-9fad-96136639874e

I have created screen recording with the issue reproduction on 6.8.2. I am running 14.4.1 , will retest after 14.5 upgrade and report back

svladek commented 1 week ago

Reproduced on Sonoma 14.5 after fresh upgrade. Tested both 6.8.1 and 6.8.2 builds

glushchenko commented 1 week ago

Reproduced on Sonoma 14.5 after fresh upgrade. Tested both 6.8.1 and 6.8.2 builds

What file system are you using? Is it cloud or just disk? Do you have time synchronization set up? Is it a qwerty keyboard? Is it RTF/txt/md? Container textbundle or none? What out-of-the-box stuff do you use?

It happens in a few people out of thousands, why I don't know. You should provide more data.

erik-nava commented 1 week ago

On 6.8.1, disk, MacOS time sync (whatever is built in), qwerty keyboard, MD, no container. (sonoma 14.5 also)

Oddly, I created an empty folder ($HOME/TestNotes) outside of my Notes root ($HOME/Notes), added it as an external folder, and that does not exhibit the behavior. Subfolders in $HOME/Notes exhibit the behavior, including a new one I made to test. There was a .git/ folder in $HOME/Notes but moving it out and restarting did not change the behavior.

glushchenko commented 1 week ago

@erik-nava thanks, check this build and let me know:

FSNotes.zip

RainofTerra commented 1 week ago

I just typed the following into FSNotes (app store version) and I'm pretty sure I didn't make any typos but:

I am typingI hit enter bu
 I am what the hl now I'm on another line butaon whoa its not just eating newlines its like randomly eating things.
also what the hell itdid it again, and where did that space in itdid go? is somethng eatingkeys here? anyway this is on the app store version.

I just typed this into the version from that zip file:

ok s newline isn'tbeing eaten anymore but some things stillare? wtf is gong on here. WHERE DID THE I INOING GO? OR THE G IN GOING? this line was on the github version.

So the new version stopped the newline being eaten (which isn't actually accurate, the newline is being entered its just going back to the previous line) but it feels like other keys are being eaten somehow. My setup on my work Mac is Sonoma 14.5, my folder is in Dropbox, there are ~900 files in it, 853 of which are just in the main folder. The same setup is present on my personal Mac, but that one doesn't have this problem.

I don't see this problem in iTerm2, vscode, sublime text 4, etc. so nothing is eating input globally.

erik-nava commented 1 week ago

@glushchenko unfortunately I have some limitations on this laptop for installing things, and my personal laptops are not exhibiting the behavior, even with identical settings. I did verify that though adding a new external folder seems to fix it for new files in that new folder until a restart, at which point it reverts to newlines not working right.

Potentially some timestamp wackiness from antivirus? Is there a way I can disable autosave on the build I have (6.8.1) to see if that changes the behavior?

glushchenko commented 1 week ago

FSNotes tracks changes externally by looking at metadata, in particular the creationDate and modificationDate. If this data changes, fseventsd tracks it and passes it to the program, FSNotes sees that the modification date has changed and reloads the file.

This is not iterm or vscode, where it doesn't matter if the files have changed, many people open their notes in external editors and not only, for synchronization it is important to track the modification date.

You have to find the reason, some program probably changes the modification date of the notes?

RainofTerra commented 1 week ago

Hmm, whatever it is doesn't get synced to Dropbox. Does fseventsd tell you what is modifying the files by chance? Does access time changing cause a reload, or just modification?

svladek commented 1 week ago

Reproduced on Sonoma 14.5 after fresh upgrade. Tested both 6.8.1 and 6.8.2 builds

What file system are you using? Is it cloud or just disk? Do you have time synchronization set up? Is it a qwerty keyboard? Is it RTF/txt/md? Container textbundle or none? What out-of-the-box stuff do you use?

It happens in a few people out of thousands, why I don't know. You should provide more data.

Thank You for this questions , so I was using Amazon WorkDocs folder on my laptop that gets synced . I have moved to a local disk without any cloud integration and retested again . This fixed it both in 6.8.1. and 6.8.2 Thank You for helping

glushchenko commented 1 week ago

FSNotes_6.8.2.zip

OK, experimental build that blocks external changes for 2 seconds after saving a note.

honyczek commented 1 week ago

@glushchenko the 6.8.2 build 632 works much better. Only I change the document title (# Heading at the beginning) and file auto-naming is enabled, an action of writing a text on the second line is interrupted a few times. But later the issue seems to be away.

glushchenko commented 1 week ago

@honyczek can you record a video?

honyczek commented 1 week ago

Sorry, I've found out that the issue appeared only after the upgrade. Now I'm trying to reproduce but unsuccessfully. If I see it again I'll record it.

tonilampela commented 1 week ago

Also having this issue with latest Mac AppStore version 6.8.1 (628) on macOS Sonoma 14.5. For what it's worth my files are on OneDrive.

RainofTerra commented 4 days ago

FSNotes_6.8.2.zip

OK, experimental build that blocks external changes for 2 seconds after saving a note.

I am now typing in this thing and nothing is going wrong and it doesn't seem like any characters are gtin nop I just lost an e but it is a lo better than it was before

So I think this is what the problem is (and I will try to see what is modifying things, but I expect it is Crowdstrike Falcon), maybe just needing a configurable value for how long to ignore?

I'm trying to find something in fsusage that looks like anything in that directory is being modified but the only writes I'm see are FSNotes itself. Other than FSNotes, these are the only calls fsusage sees:

fsgetpath
getattrlist
getxattr
listxattr
lstat64
open
openat
stat64
smcavoy commented 4 days ago

I have experienced this problem with 6.8.1 on a MacBook Pro M1 running 14.5 with Crowdstrike Falcon agent running.

6.8.2 does not have the same issue but I have noticed that a editor only window will “flicker” when it takes up the length of the screen and you are typing at the bottom of the screen, not sure if this is related to the “resolved” resetting cursor issue.

On Fri, Jun 28, 2024 at 4:21 PM Terra Field @.***> wrote:

FSNotes_6.8.2.zip https://github.com/user-attachments/files/15943780/FSNotes_6.8.2.zip

OK, experimental build that blocks external changes for 2 seconds after saving a note.

I am now typing in this thing and nothing is going wrong and it doesn't seem like any characters are gtin nop I just lost an e but it is a lo better than it was before

So I think this is what the problem is (and I will try to see what is modifying things, but I expect it is Crowdstrike Falcon), maybe just needing a configurable value for how long to ignore?

— Reply to this email directly, view it on GitHub https://github.com/glushchenko/fsnotes/issues/1701#issuecomment-2197592469, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJL6EPVIP33OROXL6YSYFTZJXAWFAVCNFSM6AAAAABD4YEWIOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJXGU4TENBWHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>