fix(reply modal): stop recentering on input

This commit is contained in:
Tommaso Casaburi
2026-03-29 16:40:09 +07:00
parent e7d175afa1
commit e345935aac
2 changed files with 37 additions and 6 deletions
+9 -4
View File
@@ -111,10 +111,15 @@ const ReplyModal = ({ closeModal, showReplyModal, parentCid, parentNumber, threa
const nodeRef = useRef<HTMLDivElement>(null);
const isMobile = useIsMobile();
const [{ left, top }, api] = useSpring(() => ({
left: Math.round(window.innerWidth / 2 - 150),
top: Math.round(window.innerHeight / 2 - 200),
}));
const [{ left, top }, api] = useSpring(
() => ({
from: {
left: Math.round(window.innerWidth / 2 - 150),
top: Math.round(window.innerHeight / 2 - 200),
},
}),
[],
);
const bind = useDrag(
({ active, event, offset: [ox, oy] }) => {