Closed indigoxela closed 9 months ago
Another related upstream issue: https://github.com/tinymce/tinymce/issues/8522
I can confirm that it has something to do with selection. So editor.selection.select(node) seems a valid workaround for duplicated images on insert (from image browser).
And the dragging problem also has to do with selection, it seems.
Another problem caused by the same glitch - removing selected images via key does not work, when image is floated. And also cut/paste inside the editor.
There are some annoying bugs with images - only with Firefox.
Here for reference an upstream issue: https://github.com/tinymce/tinymce/issues/9129
Problem 1
When images are displayed as block element, either by "display" directly, or implicit by float, the images aren't draggable inside the editor content.
Problem 2
When trying to replace an image, and that image is floated or display-block, the new image gets added instead that it replaces the existing one.
Currently to me these two problems seem related somehow.
The weird part: it only occurs, if using the toolbar buttons (both, backdropimage or tinymce_imce plugin are affected). It I use the doubleclick, which the backdropimage plugin provides, no duplication happens.
Tried to find something related in the Mozilla issue queue, but didn't find anything obvious. Tried Tiny v 5 in above upstream issue demo - that didn't show that bug.