From c18a1eb57a5ae42cf484fd69c9a9e1fa20f9d61b Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 24 May 2015 19:25:42 +0200 Subject: [PATCH] Fixed issue with wcfDialog() if element is not within the DOM --- wcfsetup/install/files/js/WCF.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 7800ac6e33..e187be3304 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -9166,6 +9166,11 @@ jQuery.fn.extend({ } } else { + if (this[0].parentNode === null) { + // if element is not already part of the DOM, UIDialog.open() will fail + document.body.appendChild(this[0]); + } + UIDialog.open(id, null, (args.length === 1 && typeof args[0] === 'object') ? args[0] : {}); } }).bind(this)); -- 2.20.1