sissilab / obsidian-image-toolkit

An Obsidian plugin for viewing an image.
MIT License
312 stars 23 forks source link

Can't open images when inside callouts #113

Closed itsonlyjames closed 4 months ago

itsonlyjames commented 5 months ago

Image inside callout:

Screenshot 2024-06-29 at 20 41 28

Clicked (it squishes). When using a mouse I can get it to work some times but it's random

Screenshot 2024-06-29 at 20 41 31
sissilab commented 4 months ago

@itsonlyjames Thanks for the feedback on this issue. I'm trying to reproduce it, and it seems that this plugin can still work but only display the source code of that Callout block in Preview Mode. I haven't encountered any squished images and so could you please provide more details about that if you still got that problem.

itsonlyjames commented 4 months ago

@sissilab Interestingly, I no longer have any issues with opening an image inside a callout, whether by an update or other means I'm unsure (maybe I caused the issue myself in my vault with custom CSS or something). Anyway, when opening the image inside the callout, it does make active the callout, and as such can interupt the flow of the page. I wonder if it's possible to add a preventDefault or something to stop "editing" the callout, like it would if you click on any part of the callout in edit mode. Behaviour is different depending on whether you click out of the image, or press escape. Both scenarios are encompassed in the below gif, respectively: Jul-02-2024 11-03-00

itsonlyjames commented 4 months ago

@sissilab, I will close this issue as it is fixed and will look into the other request I made in a seperate PR. Cheers