Can re-use the UID as new window target name!
This commit is contained in:
parent
eb49a4157e
commit
dfaec0605a
|
@ -383,6 +383,7 @@ function Compose({
|
|||
// );
|
||||
|
||||
const newWin = openCompose({
|
||||
uid: UID.current,
|
||||
editStatus,
|
||||
replyToStatus,
|
||||
draftStatus: {
|
||||
|
|
|
@ -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}`,
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue