mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(n8n Form Node): Popup does not work in some browsers (no-changelog) (#12176)
This commit is contained in:
@@ -82,27 +82,22 @@ export const executionFilterToQueryFilter = (
|
||||
return queryFilter;
|
||||
};
|
||||
|
||||
let formPopupWindow: Window | null = null;
|
||||
let formPopupWindow: boolean = false;
|
||||
|
||||
export const openFormPopupWindow = (url: string) => {
|
||||
if (!formPopupWindow || formPopupWindow.closed) {
|
||||
if (!formPopupWindow) {
|
||||
const height = 700;
|
||||
const width = window.innerHeight - 50;
|
||||
const left = (window.innerWidth - height) / 2;
|
||||
const top = 50;
|
||||
const features = `width=${height},height=${width},left=${left},top=${top},resizable=yes,scrollbars=yes`;
|
||||
const windowName = `form-waiting-since-${Date.now()}`;
|
||||
formPopupWindow = window.open(url, windowName, features);
|
||||
} else {
|
||||
formPopupWindow.location = url;
|
||||
formPopupWindow.focus();
|
||||
window.open(url, windowName, features);
|
||||
formPopupWindow = true;
|
||||
}
|
||||
};
|
||||
|
||||
export const closeFormPopupWindow = () => {
|
||||
formPopupWindow?.close();
|
||||
formPopupWindow = null;
|
||||
};
|
||||
export const clearPopupWindowState = () => (formPopupWindow = false);
|
||||
|
||||
export function displayForm({
|
||||
nodes,
|
||||
|
||||
Reference in New Issue
Block a user