From 77177921c24d65ad6fb3c8be928d61de81fc7653 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 26 Jun 2020 14:46:20 +0200 Subject: [PATCH] Fix context menu csp in pads --- www/pad/csp.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/www/pad/csp.js b/www/pad/csp.js index b615e040e..242ff60db 100644 --- a/www/pad/csp.js +++ b/www/pad/csp.js @@ -77,10 +77,11 @@ define(['jquery'], function ($) { if (that.onLoad) { that.onLoad(); } - }).contents().find('body').on('click dragstart', '.cke_button, a.cke_colormore, a.cke_colorbox, .cke_colorauto, .cke_combo_button, .cke_panel_listItem a', function (e) { + }).contents().find('body').on('click dragstart mouseover mouseout', '.cke_button, a.cke_colormore, a.cke_colorbox, .cke_colorauto, .cke_combo_button, .cke_panel_listItem a, a.cke_menubutton', function (e) { e.preventDefault(); if (e.type === 'dragstart') { return false; } - var attr = $(e.currentTarget).attr('onclick'); + var attr = $(e.currentTarget).attr('on'+e.type); + if (!attr) { return; } var reg = /CKEDITOR.tools.callFunction\(([0-9]+),'?([A-Za-z0-9 ?]+)'?(,'([A-Za-z0-9 ]+)')?\);/; var match = attr.match(reg); if (!match) { return; }