mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(reply modal): stop recentering on input
This commit is contained in:
@@ -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] }) => {
|
||||
|
||||
Reference in New Issue
Block a user