obsidian-map-view icon indicating copy to clipboard operation
obsidian-map-view copied to clipboard

v5.5.0 hover popup cannot be clicked with mouse on desktop

Open moontango opened this issue 10 months ago • 8 comments

With 5.5.0 the hover popup now adds an icon toolbar at the top, with the "open" and "close" buttons.

The main problem is that on the desktop, there is no way for me to access those icons because the moment the cursor leaves the location marker the entire popup disappears. i.e. the cursor can never ever get to the toolbar of the hover popup.

Suggestions:

Make a delay transition to the hover popup so that when the cursor leaves the marker location, the popup doesn't immediately disappear.

Using Obsidian Desktop (Mac).

moontango avatar Feb 21 '25 07:02 moontango

Hi, Indeed the buttons aren't usable when using a mouse. I considered making them appear only on mobile, but there are also many laptops and tablets on which they are beneficial. My thinking was that you don't really need them if you have a mouse (clicking a marker will open the note and the popup closes when you hover away), do you think otherwise?

esm7 avatar Feb 21 '25 13:02 esm7

Hi,

Indeed the "close" and "open" icons are superfluous (I have the entire toolbar hidden by custom css).

There's another major use case for having the popover not disappear immediately the moment the cursor leaves the marker location:

Image

It woud be awesome to be able to leave the main marker (i.e. the number "2" above) and hover over the two subsdiary markers so that we can get the respective popup. As currently implemented, this can't be done at all - the main aggregate marker "2" has to be clicked, thus zooming the map in, before we can hover over the subsidiary markers.

Prior to 5.5.0, I had custom CSS to add a delay transition to the popup (by adjusting opacity while keeping display:block on), so that the cursor can make it over to the popup before it could disappear. But with 5.5.0, it appears that JS immediately removes the popup regardless.

moontango avatar Feb 21 '25 13:02 moontango

Very interesting use case. I did not have this in mind at all, and didn't intentionally break it (I don't think I intentionally touched the "marker cluster popup", it probably broke because of some other change).

  1. Can you share your custom CSS so I'll see what made it stop working?
  2. Is there a similar use case for the marker hover popup (not the marker cluster) that I might be missing?

esm7 avatar Feb 21 '25 13:02 esm7

Hi esm7,

Here's the code I used previously:

.map-view-main .popover.hover-popup {
    display: block !important; 
}

.map-view-main:not(:has(.mv-fade-marker-shown)) .popover.hover-popup:not:hover {
    z-index: 0;
    transition-delay: 500ms;
    transition-property: opacity, z-index;
    opacity: 0%;
}

.map-view-main .popover.hover-popup:hover {
    z-index: 2000; 
    opacity: 100%;
} 

Now it doesn't work at all.

It appears that javascript completely removes the child node under .mv-marker-popup-container when hover is off. i.e. all the pictures, text etc. just disappears.

moontango avatar Feb 23 '25 09:02 moontango

It does for the marker preview popup, but not supposed to do so for the cluster preview. Will check.

esm7 avatar Feb 23 '25 09:02 esm7

Thanks.

Actually, there are also use cases for having a delay in closing the regular preview popup on the desktop: a) in my case, I have a single photo in the preview of the location. If I can (and I could, previously) click on the photo, it will expand to fullscreen (I have a plugin for this); b) in other situations, I can imagine it'd be useful to be able to click on hyperlinks in the preview as well.

moontango avatar Feb 23 '25 14:02 moontango

Hi, I also strongly agree with this new requirement. It would be really great if the plugin could provide relevant settings to adjust the behavior of the hover popup, such as adding a delay for its disappearance—similar to how the Hover Editor plugin works in Obsidian. This would make the user experience much more flexible and user-friendly. (Translated by AI)

lizyukar-boop avatar Sep 03 '25 16:09 lizyukar-boop

Hi. I would like to just jump in and say that I have no idea whatsoever how to get a popup upon hovering that actually shows either an image or contents of the note. The only thing i ever see, is part of the YAML of my note. Am I missing part of the documentation. I really want to be able to customise the popups, but I'm completely in the dark about it. Any pointers would be hugely appreciated.

bespokecomp avatar Nov 02 '25 15:11 bespokecomp