Can re-use the UID as new window target name!

This commit is contained in:
Lim Chee Aun 2023-01-11 23:23:49 +08:00
parent eb49a4157e
commit dfaec0605a
2 changed files with 3 additions and 1 deletions

View file

@ -383,6 +383,7 @@ function Compose({
// );
const newWin = openCompose({
uid: UID.current,
editStatus,
replyToStatus,
draftStatus: {

View file

@ -5,9 +5,10 @@ export default function openCompose(opts) {
const top = Math.max(0, (screenHeight - 450) / 2);
const width = Math.min(screenWidth, 600);
const height = Math.min(screenHeight, 450);
const winUID = opts.uid || Math.random();
const newWin = window.open(
url,
'compose' + Math.random(),
'compose' + winUID,
`width=${width},height=${height},left=${left},top=${top}`,
);