From d7d25c0a71a62144c443a0f65b02ba1e1ec970da Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 21 Oct 2020 13:41:36 +0200 Subject: [PATCH] Use correct version string for ckeditor icons --- www/pad/csp.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/www/pad/csp.js b/www/pad/csp.js index 3f401eb8f..02f21f883 100644 --- a/www/pad/csp.js +++ b/www/pad/csp.js @@ -19,6 +19,16 @@ define(['jquery'], function ($) { var $a = $('.cke_toolbox_main').find('.cke_button, .cke_combo_button'); $a.each(function (i, el) { var $el = $(el); + var $icon = $el.find('span.cke_button_icon'); + if ($icon.length) { + try { + var url = $icon[0].style['background-image']; + var bgImg = url.replace(/ !important$/, ''); + if (bgImg) { + $icon[0].style.setProperty('background-image', bgImg, 'important'); + } + catch (e) { console.error(e); } + } $el.on('keydown blur focus click dragstart', function (e) { e.preventDefault(); var attr = $(el).attr('oon'+e.type);