backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 40 forks source link

Image dialog duplicates library view on repeated clicks #6566

Open indigoxela opened 5 months ago

indigoxela commented 5 months ago

Description of the bug

Not sure, when this broke... Some weird AJAX behavior with editor image link.

Steps To Reproduce

  1. Make sure, image upload's enabled on admin/config/content/formats/filtered_html
  2. Open a node form, like node/add/post
  3. There's an editor (which one doesn't matter)
  4. Open the image dialog and click on "Select from library", several times

Actual behavior

With every click on "Select from library" a new view instance gets added. And another, and another, and...

duplicated-view-content

Expected behavior

There's just one view instance of image_library.

Additional information

indigoxela commented 5 months ago

Wait a minute, isn't that supposed to be fixed since https://github.com/backdrop/backdrop-issues/issues/5867?

Is it the same bug or an new one? :thinking:

Edit: no, not the same, just similar. We didn't check consecutive clicks, I guess. Whatever goes wrong, it happens in core/modules/filter/js/filter.js