diff --git a/wax-prosemirror-components/src/components/Overlay.js b/wax-prosemirror-components/src/components/Overlay.js
index 47397c5c9b28ac585640bab6439951353bc3f5b5..fabbf8872d7c02f7b1427aa94475a39095c283ef 100644
--- a/wax-prosemirror-components/src/components/Overlay.js
+++ b/wax-prosemirror-components/src/components/Overlay.js
@@ -7,7 +7,7 @@ const OverlayContainer = styled.div`
   left: ${props => `${props.position.left}px`};
   position: ${props => props.position.position};
   top: ${props => `${props.position.top}px`};
-  z-index: 999;
+  z-index: ${props => props.position.zIndex};
 `;
 
 const Overlay = props => (
diff --git a/wax-prosemirror-services/src/OverlayService/usePosition.js b/wax-prosemirror-services/src/OverlayService/usePosition.js
index ffef794410abc3d7c73a217c9ca97a3b76c0a252..32d86bad560bea24f5eb711a7e575cbf3fbc544f 100644
--- a/wax-prosemirror-services/src/OverlayService/usePosition.js
+++ b/wax-prosemirror-services/src/OverlayService/usePosition.js
@@ -12,13 +12,11 @@ const defaultOverlay = {
 };
 
 export default options => {
-  const {
-    view: { main },
-    activeView,
-  } = useContext(WaxContext);
+  const { activeView } = useContext(WaxContext);
 
   const [position, setPosition] = useState({
     position: 'absolute',
+    zIndex: 999,
     ...defaultOverlay,
   });
 
@@ -107,6 +105,7 @@ export default options => {
   useLayoutEffect(() => {
     setPosition({
       position: 'absolute',
+      zIndex: 999,
       ...updatePosition(options.followCursor),
     });
   }, [JSON.stringify(updatePosition(options.followCursor))]);