Skip to content
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

Loading an existing file focusses image description #6843

Open
juliusknorr opened this issue Jan 10, 2025 · 0 comments
Open

Loading an existing file focusses image description #6843

juliusknorr opened this issue Jan 10, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@juliusknorr
Copy link
Member

Describe the bug
When loading an existing file that contains images the focus jumps to the alt text input

To Reproduce
Steps to reproduce the behavior:

  1. Create a new file with some long text
  2. Add an image after it
  3. Move the cursor to the top
  4. Close and reopen the file

Expected behavior
The cursor is at the beginning

Actual behaviour
The cursor is in the alt text of the image

Additional context

This seems like a side effect of #6609

I'm unsure what the best way would be to catch only inserting new attachments. @max-nextcloud Any idea on how we could check that? I don't see any hooks for tiptap node or node views that would only trigger on first creation. Maybe we can override the setImage command and pass a non-persited flag to focus once?

cc @JuliaKirschenheuter

@juliusknorr juliusknorr added the bug Something isn't working label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant