mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(reply modal): do nothing when clicking another cid while modal is opened
This commit is contained in:
@@ -21,11 +21,7 @@ const useReplyModal = () => {
|
|||||||
setScrollY(currentScrollY);
|
setScrollY(currentScrollY);
|
||||||
}
|
}
|
||||||
if (activeCid && activeCid !== cid) {
|
if (activeCid && activeCid !== cid) {
|
||||||
closeModal();
|
return;
|
||||||
setTimeout(() => {
|
|
||||||
setActiveCid(cid);
|
|
||||||
setShowReplyModal(true);
|
|
||||||
}, 0); // minimal timeout to allow for state reset
|
|
||||||
} else if (!activeCid) {
|
} else if (!activeCid) {
|
||||||
setActiveCid(cid);
|
setActiveCid(cid);
|
||||||
setShowReplyModal(true);
|
setShowReplyModal(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user