Skip to content
Snippets Groups Projects
Commit 574d9ce8 authored by Benjamin Franzke's avatar Benjamin Franzke Committed by Andreas Fernandez
Browse files

[BUGFIX] Avoid global jQuery usage in RTE link wizard

The global variable $ (window.$) has been removed with #97243.
This caused the RTE link wizard to fail with a JavaScript
error as $.isEmptyObject is used in typo3link.js.

Resolves: #97301
Related: #97243
Releases: main
Change-Id: Iaafb02fa52039f8443289c4b16123e67c25b39ce
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74178


Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
parent 3f076b1a
Branches
Tags
No related merge requests found
......@@ -45,6 +45,13 @@
}
});
/*
* @param {Object} obj
*/
function isEmptyObject(obj) {
return obj && Object.keys(obj).length === 0 && Object.getPrototypeOf(obj) === Object.prototype;
}
/**
* Open link browser
*
......@@ -54,7 +61,7 @@
function openLinkBrowser(editor, element) {
var additionalParameters = '';
if ($.isEmptyObject(element)) {
if (!element || isEmptyObject(element)) {
element = CKEDITOR.plugins.link.getSelectedLink(editor);
}
if (element) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment