From f10eee20c3d4f0e022bf73f3ab50eca7a64f36ea Mon Sep 17 00:00:00 2001 From: Sara Boutej <40363501+SaraBoutej@users.noreply.github.com> Date: Fri, 22 Dec 2023 16:48:55 +0100 Subject: [PATCH] feat: Fix error when selecting text and make it bold - MEED-3074- Meeds-io/MIPs#107 (#568) This changes allows to fix the js console error when selecting a text and make it bold/italic using the CKeditor balloon toolbar. --- .../src/main/webapp/ckeditor/plugins/balloonpanel/plugin.js | 1 + 1 file changed, 1 insertion(+) diff --git a/commons-extension-webapp/src/main/webapp/ckeditor/plugins/balloonpanel/plugin.js b/commons-extension-webapp/src/main/webapp/ckeditor/plugins/balloonpanel/plugin.js index 957b70eed0..2d3083d256 100644 --- a/commons-extension-webapp/src/main/webapp/ckeditor/plugins/balloonpanel/plugin.js +++ b/commons-extension-webapp/src/main/webapp/ckeditor/plugins/balloonpanel/plugin.js @@ -418,6 +418,7 @@ return item.getClientRects( true )[ 0 ]; } ); } else { + elementOrSelection.selectRanges([ranges[ ranges.length - 1 ]]); rectList = ranges[ ranges.length - 1 ].getClientRects( true ); }