Unverified Commit 53703874 authored by Andrey Azov's avatar Andrey Azov Committed by GitHub
Browse files

Fix the position of the ViewInApp popup while scrolling (#494)

parent e6ea1356
Pipeline #150923 passed with stages
in 5 minutes and 53 seconds
@import 'src/styles/common';
.wrapper {
position: relative;
}
.pointerBox {
padding: 6px 12px;
background: $black;
......
......@@ -34,11 +34,12 @@ const ViewInAppPopup = (props: ViewInAppPopupProps) => {
const anchorRef = useRef<HTMLSpanElement>(null);
return (
<span ref={anchorRef} onClick={() => setShowPointerBox(!showPointerBox)}>
<span className={styles.wrapper} ref={anchorRef} onClick={() => setShowPointerBox(!showPointerBox)}>
{children}
{showPointerBox && anchorRef.current && (
<PointerBox
anchor={anchorRef.current}
renderInsideAnchor={true}
onOutsideClick={() => setShowPointerBox(false)}
position={props.position}
autoAdjust={true}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment