Uploading an image via the comment section breaks task view #1909

Closed
opened 2026-03-22 13:45:41 -05:00 by GiteaMirror · 9 comments
Owner

Originally created by @Spiritreader on GitHub (Jan 28, 2024).

Description

When adding a new image via the comment section by clicking on the image icon, after the image has been uploaded, it is no longer possible to navigate the site if you're in the /tasks/xyz view.

When in Kanban mode, trying to close the task popup results in vikunja doing a browser does nothing, and clicking on a blank space causes the browser to back-navigate for each click.

I've attached screenshots and a gif that describes the issue.

Attachments itself work fine, it's just adding an image as comment that causes this.

Vikunja Frontend Version

0.22.0

Vikunja API Version

v0.22.0

Browser and version

Firefox 123.03b / Vivaldi 6.5.3206.57

Can you reproduce the bug on the Vikunja demo site?

Yes

Screenshots

image

Task after uploading attachment via the image icon
image

After adding a photo the console shows this
image

Gif of issue
vikunja_image_comments

Originally created by @Spiritreader on GitHub (Jan 28, 2024). ### Description When adding a new image via the comment section by clicking on the image icon, after the image has been uploaded, it is no longer possible to navigate the site if you're in the `/tasks/xyz` view. When in Kanban mode, trying to close the task popup results in vikunja doing a browser does nothing, and clicking on a blank space causes the browser to back-navigate for each click. I've attached screenshots and a gif that describes the issue. Attachments itself work fine, it's just adding an image as comment that causes this. ### Vikunja Frontend Version 0.22.0 ### Vikunja API Version v0.22.0 ### Browser and version Firefox 123.03b / Vivaldi 6.5.3206.57 ### Can you reproduce the bug on the Vikunja demo site? Yes ### Screenshots ![image](https://github.com/go-vikunja/frontend/assets/18438899/383f95d2-ef15-43f0-a0b8-c22907820c63) Task after uploading attachment via the image icon ![image](https://github.com/go-vikunja/frontend/assets/18438899/9e40b939-afb0-432c-bab0-bb073ea995ca) After adding a photo the console shows this ![image](https://github.com/go-vikunja/frontend/assets/18438899/17f7da52-5c28-4b27-a629-4306b666081e) Gif of issue ![vikunja_image_comments](https://github.com/go-vikunja/frontend/assets/18438899/e92b937a-1b5d-4437-baa9-e9bea68375ff)
GiteaMirror added the area/frontendneeds reproduction labels 2026-03-22 13:45:41 -05:00
Author
Owner

@kolaente commented on GitHub (Jan 29, 2024):

Can you reproduce this with the latest release? (0.22.1)

@kolaente commented on GitHub (Jan 29, 2024): Can you reproduce this with the latest release? (0.22.1)
Author
Owner

@YKPDang commented on GitHub (Jan 29, 2024):

Hey, I'm using the same vikunja instance as @Spiritreader

Can you reproduce this with the latest release? (0.22.1)

Partly. If I upload an image with the image button I still get the issue right after I inserted it.

However, once I completely close the tab and re-open vikunja, the issue is gone.

This doesn't work:

  • Create issue
  • click on image button in comments
  • upload image
  • try to close issue (fails here)

This works:

  • Create issue
  • click on image button in comments
  • upload image
  • close vikunja tab and re-open or full page reload (f5)
  • open issue with issue comment
  • close issue with comment

This also occurs on the vikunja demo site.

Here's the error:
29420f52-6f01-46c6-80e6-6bf0fbe22e40

@YKPDang commented on GitHub (Jan 29, 2024): Hey, I'm using the same vikunja instance as @Spiritreader > Can you reproduce this with the latest release? (0.22.1) Partly. If I upload an image with the image button I still get the issue right after I inserted it. However, once I completely close the tab and re-open vikunja, the issue is gone. This doesn't work: - Create issue - click on image button in comments - upload image - try to close issue (fails here) This works: - Create issue - click on image button in comments - upload image - close vikunja tab and re-open or full page reload (f5) - open issue with issue comment - close issue with comment This also occurs on the vikunja demo site. Here's the error: ![29420f52-6f01-46c6-80e6-6bf0fbe22e40](https://github.com/go-vikunja/frontend/assets/30187411/ec2f864a-6457-4d3f-aa66-c0c772ac9fd2)
Author
Owner

@kolaente commented on GitHub (Jan 29, 2024):

Does this only happen with images uploaded via a comment or with task descriptions as well? (They use the same upload mechanism)

@kolaente commented on GitHub (Jan 29, 2024): Does this only happen with images uploaded via a comment or with task descriptions as well? (They use the same upload mechanism)
Author
Owner

@YKPDang commented on GitHub (Jan 29, 2024):

Happens with task descriptions as well, same steps to reproduce.
TypeError: ie is null shows up when I click away from the dialog or on the closing X symbol

Console output

cfglsXsnNZ

@YKPDang commented on GitHub (Jan 29, 2024): Happens with task descriptions as well, same steps to reproduce. `TypeError: ie is null` shows up when I click away from the dialog or on the closing X symbol <details> <summary>Console output</summary> ![cfglsXsnNZ](https://github.com/go-vikunja/frontend/assets/30187411/28eadfb8-dc33-40e0-ba0c-0c215b8decb0) </details>
Author
Owner

@kolaente commented on GitHub (Jan 30, 2024):

This is definitely a bug. I'll take a look.

@kolaente commented on GitHub (Jan 30, 2024): This is definitely a bug. I'll take a look.
Author
Owner

@kolaente commented on GitHub (Feb 6, 2024):

The actual error message seems to be caused by vue trying to insert the image as a child node of a <!-- v-if --> which exists before the actual editor node. Obviously, this won't work because a comment can't have child nodes.
What does work is adding something else (text, markup, …) in the editor before adding the image. The bug seems to only happen when the image is the first element in the editor.

The best solution here would probably be to not manipulate the image element in html directly and use vue itself. Not sure if that's possible.

EDIT: Looks like the image manipulation itself is not the problem. This also fails with the default image component.
My newest best guess is this is caused by a combination of prosemirror, tiptap and data flow (The updated description is passed up by emit, then set on the variable bound to v-model and flows back down. Then the rendering crashes.

@kolaente commented on GitHub (Feb 6, 2024): The actual error message seems to be caused by vue trying to insert the image as a child node of a `<!-- v-if -->` which exists before the actual editor node. Obviously, this won't work because a comment can't have child nodes. What does work is adding something else (text, markup, …) in the editor before adding the image. The bug seems to only happen when the image is the first element in the editor. The best solution here would probably be to not manipulate the image element in html directly and use vue itself. Not sure if that's possible. EDIT: Looks like the image manipulation itself is not the problem. This also fails with the default image component. My newest best guess is this is caused by a combination of prosemirror, tiptap and data flow (The updated description is passed up by `emit`, then set on the variable bound to `v-model` and flows back down. _Then_ the rendering crashes.
Author
Owner

@kolaente commented on GitHub (Jan 21, 2025):

Hey @Spiritreader @FunnyPocketBook I just tested this again and was unable to reproduce this. Can you check if you can reproduce it on the demo?

It may have been fixed by a recent update to tiptap.

@kolaente commented on GitHub (Jan 21, 2025): Hey @Spiritreader @FunnyPocketBook I just tested this again and was unable to reproduce this. Can you check if you can reproduce it [on the demo](https://try.vikunja.io)? It may have been fixed by a recent update to tiptap.
Author
Owner

@Spiritreader commented on GitHub (Jan 21, 2025):

Hey @Spiritreader @FunnyPocketBook I just tested this again and was unable to reproduce this. Can you check if you can reproduce it on the demo?

It may have been fixed by a recent update to tiptap.

I can't upload stuff to the demo instance, but I can confirm it is fixed on our selfhosted instance running version: v0.24.6!

@Spiritreader commented on GitHub (Jan 21, 2025): > Hey [@Spiritreader](https://github.com/Spiritreader) [@FunnyPocketBook](https://github.com/FunnyPocketBook) I just tested this again and was unable to reproduce this. Can you check if you can reproduce it [on the demo](https://try.vikunja.io)? > > It may have been fixed by a recent update to tiptap. I can't upload stuff to the demo instance, but I can confirm it is fixed on our selfhosted instance running version: v0.24.6!
Author
Owner

@kolaente commented on GitHub (Jan 22, 2025):

Awesome 🥳

@kolaente commented on GitHub (Jan 22, 2025): Awesome 🥳
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#1909