CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Selecting an image in Chrome fails

by bob9999 » 03 Mar 2020 06:39

Hi there. When I insert an image in TinyMCE and then try to select it after in the Chrome browser, I receive an error in the monitor. Uncaught COMException: Failed to execute 'setBaseAndExtent' on 'Selection': There is no child at offset 1. The idea is I want to be able to drag and drop an image where the user wants.

In researching I see that this was fixed in version 4.6 (now into version 5 looking at the tiny site) so this leads me to believe you have a really old version of the editor. A same issue was occurring with magento a couple of years ago and they said to modify the tinymce.min.js file but the code is a bit different to what you have so I am unclear what I need to update. Here is the code they had below:

if (/^(IMG|HR)$/.test(e.nodeName)) {
- selection.getSel().setBaseAndExtent(e, 0, e, 1);
+ /** Removed webkit bug fix - it breaks in Chrome 58 */
+ selection.select(e);
}

https://magento.stackexchange.com/quest ... or-anymore

The recommendation is to have the plugin updated or to update the js file so then it will work in Chrome. This broke way back i version 58 and Chrome is now version 80. This plugin for CG seems to be in dire need of an update.

In lieu of that, can you let us know what needs to be updated in the js file to make this work on Chrome? Opera has same issue and I can only select images in Firefox so far.

Cheers.
bob9999
 
Posts: 110
Joined: 18 Jan 2019 17:32

Return to CGTinyMCE

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.