Skip to content

Metadata losing keyboard focus while typing #1365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DarrenCook opened this issue May 4, 2025 · 11 comments
Open

Metadata losing keyboard focus while typing #1365

DarrenCook opened this issue May 4, 2025 · 11 comments
Labels

Comments

@DarrenCook
Copy link

DarrenCook commented May 4, 2025

I can often be typing in the Metadata tab (the Notes/References section is where I have noticed it most) and keyboard focus disappears.

I cannot reproduce this on demand (UPDATE: I can now, see first comment). I am often pasting in, then editing, text containing markdown. So it might be related to that. But I suspect it is likely triggered by the saving of the scene data.

This is usually just mildly irritating, but as I just commented on #1258, it seems the keyboard focus can get moved to the project tree, and the typing intended for the metadata window then can cause whole scenes to be deleted and lost forever.

@DarrenCook
Copy link
Author

DarrenCook commented May 7, 2025

I found the logs, and so have been running tail -f while using Manuskript.
I was about to propose it is correlated with the auto-save, but having done more tests I think I can get it to happen consistently by:

Cursor into summary. Then ctrl-v to paste. The caret flashes once then disappears. If I start moving the caret during that brief half-second window, then it stays there. Otherwise it appears reproducible!
And it happens in exactly the same with ctrl-x to cut.
But not for ctrl-c, so it seems the text has to change.

I can also get it to happen with highlight a few letters, press del, then ctrl-z. It happens even if it was a single character being restored by undo.

Yet it won't happen with normal typing.


Aha! I've just associated it with another bug I have been trying to narrow down enough to report.
In the main editor do one of the above triggers (paste/cut/undo). The caret doesn't disappear, but what happens instead is that contents of the Metadata section disappear and it greys out.

They don't come back until I make another edit in the main edit window. No data lost. I've also seen it run an auto-save during the blanked out phase with no problem.

Hhmmm, I can't get this to happen every time. There seems to be times when it is perfectly reproducible, though, especially with ctrl-z, like it has got into a situation (undo stack??) where the bug can be triggered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

12 participants
@DarrenCook @TheJackiMonster and others