javalent / obsidian-leaflet

Adds interactive maps to Obsidian.md using Leaflet.js
481 stars 29 forks source link

"Reset Zoom" in notes on canvas wipes note content #346

Closed Einhornhool closed 1 year ago

Einhornhool commented 1 year ago

Hi, I just came across a weird bug (I'm not sure if it's a canvas problem or a leaflet problem, but since I haven't encountered it with other plugins so far, I thought I'd mention it here). Sometimes, when I show a note with a leaflet map on a canvas and click on "Reset Zoom", the whole content of the note gets deleted. Also the canvas crashes and I need to close and reopen it to be able to do anything else. My Obsidian Version is 1.1.16 and Leaflet is at 5.2.6.

I played around a little and it only seems to happen when I edit the leaflet code block while on the canvas and then rerender it. How to recreate:

  1. Create a note containing a leaflet map and some text
  2. Add note to canvas
  3. Double click on note to edit
  4. Double click on map to show code block
  5. Exit code block and render map (now the "Reset Zoom" icon should have little offset)
  6. Click "Reset Zoom"

Expected Outcome: Content flickers once and then vanishes, Canvas crashes

sigrunixia commented 1 year ago

@Einhornhool

I am not able to reproduce this. Can you confirm it is still an issue and if so, try to see if there is an error in the developer console?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.