From 900b5d7f34908dad01bb569fc06b0dbb0b867c66 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 5 Jan 2020 20:43:29 +0100 Subject: [PATCH] Moved the dialog to prevent interference with the dialog's maintainFocus() --- .../js/3rdParty/redactor2/plugins/WoltLabLink.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabLink.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabLink.js index 6805cbef00..e975bd9123 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabLink.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabLink.js @@ -79,6 +79,13 @@ $.Redactor.prototype.WoltLabLink = function() { // is link var $el = this.link.is(); + // build link + if (hasSelectedText) this.selection.restore(); + + var link = this.link.buildLinkFromElement($el); + + if (hasSelectedText) this.selection.save(); + // WoltLab START // this.link.buildModal($el); _dialogApi.showDialog({ @@ -100,13 +107,6 @@ $.Redactor.prototype.WoltLabLink = function() { }); // WoltLab END - // build link - if (hasSelectedText) this.selection.restore(); - - var link = this.link.buildLinkFromElement($el); - - if (hasSelectedText) this.selection.save(); - // if link cut & paste inside editor browser added self host to a link link.url = this.link.removeSelfHostFromUrl(link.url); -- 2.20.1