Can re-use the UID as new window target name!
This commit is contained in:
parent
eb49a4157e
commit
dfaec0605a
2 changed files with 3 additions and 1 deletions
|
@ -383,6 +383,7 @@ function Compose({
|
||||||
// );
|
// );
|
||||||
|
|
||||||
const newWin = openCompose({
|
const newWin = openCompose({
|
||||||
|
uid: UID.current,
|
||||||
editStatus,
|
editStatus,
|
||||||
replyToStatus,
|
replyToStatus,
|
||||||
draftStatus: {
|
draftStatus: {
|
||||||
|
|
|
@ -5,9 +5,10 @@ export default function openCompose(opts) {
|
||||||
const top = Math.max(0, (screenHeight - 450) / 2);
|
const top = Math.max(0, (screenHeight - 450) / 2);
|
||||||
const width = Math.min(screenWidth, 600);
|
const width = Math.min(screenWidth, 600);
|
||||||
const height = Math.min(screenHeight, 450);
|
const height = Math.min(screenHeight, 450);
|
||||||
|
const winUID = opts.uid || Math.random();
|
||||||
const newWin = window.open(
|
const newWin = window.open(
|
||||||
url,
|
url,
|
||||||
'compose' + Math.random(),
|
'compose' + winUID,
|
||||||
`width=${width},height=${height},left=${left},top=${top}`,
|
`width=${width},height=${height},left=${left},top=${top}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue