Skip to content

Commit

Permalink
Fix issue with z-index
Browse files Browse the repository at this point in the history
  • Loading branch information
kreafox committed Jan 3, 2023
1 parent b3bd27b commit a414943
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/SearchBlock/BlockContainer/NewBlockAddButton.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { Button } from 'semantic-ui-react';
import { BodyClass } from '@plone/volto/helpers';
import { BlockChooser, Icon } from '@plone/volto/components';
import useOutsideClick from '@eeacms/search/lib/hocs/useOutsideClick';
import addSVG from '@plone/volto/icons/add.svg';
Expand All @@ -14,14 +15,16 @@ const NewBlockAddButton = (props) => {
return (
<>
{isOpenMenu ? (
<div ref={ref}>
<BlockChooser
onMutateBlock={onMutateBlock}
currentBlock={block}
showRestricted
allowedBlocks={allowedBlocks}
/>
</div>
<BodyClass className="has-block-chooser">
<div ref={ref}>
<BlockChooser
onMutateBlock={onMutateBlock}
currentBlock={block}
showRestricted
allowedBlocks={allowedBlocks}
/>
</div>
</BodyClass>
) : (
<Button
basic
Expand Down
6 changes: 6 additions & 0 deletions src/SearchBlock/edit.less
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@
height: 100%;
z-index: @overlayZIndex;
}

body.has-block-chooser {
.aboveSearchblockOverlay {
z-index: unset;
}
}

0 comments on commit a414943

Please sign in to comment.