backdrop-contrib / leaflet

Backdrop CMS Integration with the Leaflet map scripting library.
https://backdropcms.org/project/leaflet
GNU General Public License v2.0
2 stars 2 forks source link

Z-index higher than admin menu causing some objects to sit above menu #24

Closed sbgraphicdesign closed 2 years ago

sbgraphicdesign commented 2 years ago

I have a google map displaying and the zoom control is displaying on top of the Admin Menu.

This is because the CSS z-index value is set to 1000. The admin menu z-index value is 999.

The offending CSS is this as part of leaflet.css:

.leaflet-top, .leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }

You could easily argue that the z-index value for the Admin Menu in core is too low, and it could go as high as necessary, assuming it's the one element you'd want to be the uppermost layer. However it might be easier to adjust the module css for the time being.

indigoxela commented 2 years ago

Hi @sbgraphicdesign,

many thanks for taking the time to report.

I'm aware, that Leaflet (the mapping library this module utilizes) has a higher z-index than the admin menu from core. I'm just not sure if this module can (or should) solve it.

indigoxela commented 2 years ago

Here's a pull request for testing: https://github.com/backdrop-contrib/leaflet/pull/25

indigoxela commented 2 years ago

A related core issue, which only addresses the admin menu, but not the smart-menu dropdown: https://github.com/backdrop/backdrop-issues/issues/5372

indigoxela commented 2 years ago

@sbgraphicdesign what do you think, does the approach of this PR make sense to you? Are you interested in testing?