From 4941bcdaf80b2b3ef9a45a9145981892bed6c678 Mon Sep 17 00:00:00 2001 From: Karen Attfield Date: Tue, 15 Oct 2024 12:33:13 +0100 Subject: [PATCH] Map block: Add absolute positioning for container only when Mapkit is used (#39744) --- projects/plugins/jetpack/changelog/fix-map-block-auto-height | 4 ++++ .../plugins/jetpack/extensions/blocks/map/component/mapkit.js | 1 + projects/plugins/jetpack/extensions/blocks/map/editor.scss | 1 - 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 projects/plugins/jetpack/changelog/fix-map-block-auto-height diff --git a/projects/plugins/jetpack/changelog/fix-map-block-auto-height b/projects/plugins/jetpack/changelog/fix-map-block-auto-height new file mode 100644 index 0000000000000..d53bd6f5ee2b4 --- /dev/null +++ b/projects/plugins/jetpack/changelog/fix-map-block-auto-height @@ -0,0 +1,4 @@ +Significance: patch +Type: bugfix + +Map block: Fix issue where blocks placed underneath would overlap with the map block. diff --git a/projects/plugins/jetpack/extensions/blocks/map/component/mapkit.js b/projects/plugins/jetpack/extensions/blocks/map/component/mapkit.js index 37f6a44c57cac..9645139a69a82 100644 --- a/projects/plugins/jetpack/extensions/blocks/map/component/mapkit.js +++ b/projects/plugins/jetpack/extensions/blocks/map/component/mapkit.js @@ -120,6 +120,7 @@ const MapkitComponent = forwardRef( className="wp-block-jetpack-map__gm-container" style={ { height: `${ mapHeight }px`, + position: 'absolute', pointerEvents: isSelected ? 'auto' : 'none', } } > diff --git a/projects/plugins/jetpack/extensions/blocks/map/editor.scss b/projects/plugins/jetpack/extensions/blocks/map/editor.scss index e482a2e52bb77..91a5291613cef 100644 --- a/projects/plugins/jetpack/extensions/blocks/map/editor.scss +++ b/projects/plugins/jetpack/extensions/blocks/map/editor.scss @@ -44,7 +44,6 @@ } .wp-block-jetpack-map__gm-container { - position: absolute; inset: 0; z-index: 0; }