ellatrix / wp-front-end-editor

Front-end Editor for WordPress
https://wordpress.org/plugins/wp-front-end-editor/
341 stars 87 forks source link

Remove button in floating image toolbar removes more than the image on subsequent clicks #266

Closed r-a-y closed 7 years ago

r-a-y commented 8 years ago

When the "X" button is clicked multiple times in the floating image toolbar, it removes parent elements as well.

Here's a GIF detailing what happens:

GIF

No JS errors in the console. Tested in WordPress 4.2.5 with twentytwelve (also occurs in other themes).

Looks like there is an issue with the removeImage() function in tinymce.image.js.

Update: I've added a PR for this - https://github.com/iseulde/wp-front-end-editor/pull/267/files.

ellatrix commented 7 years ago

Fixed in 51539d8.