Closing modal doesn't reset the buttons that launched it, so that if you open up another modal from the wysiwyg, the original modal opens again on top of it.
Modal 1 is a paragraph field using paragraphs classic widget in the open position. The paragraph has a field that allows for media, this is where the entity browser appears using inline entity form complex, to allow creating new or selecting (with the modal) existing media.
Modal 2 is launched from the wysiwyg with an entity embed button of a media entity. If you have previously clicked the close button on Modal 1, Modal 1 appears above Modal 2.
One thing I noticed is that the original state of the buttons that launch Modal 1 aren't resetting when you click the close button (".ui-dialog-titlebar-close").
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | bug_example.mov | 4.25 MB | oknate |
| #2 | modal-close-button-2913952-2.patch | 703 bytes | oknate |
Issue fork entity_browser-2913952
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
oknateThis patch resets the buttons when clicking the close button.
Comment #3
oknateComment #4
oknateComment #5
oknateComment #6
oknateComment #7
recrit commentedThe patch needs to limit the scope of registered click to the close button of the entity browser modal only.
Currently, it will trigger on any modal dialog close button - see patch snippet below.
Comment #8
joshua.boltz commentedI'm seeing something somewhat similar here, where within the entity browser, if i click to Edit an existing item displayed in the browser, my #states logic triggers the first time as expected. But if i then close out of the modal and try editing another item in the entity browser, my #states does not work.
I tried the patch and it did not help with that issue, but thought it may be related in some way.
Comment #9
edysmpThanks for this.
Regarding to #7 I can't see a use case when need to open more the one modal at a time. Also i don't think it is possible.
Comment #10
dave reidDoes this need to be re-rolled or applied to 8.x-2.x first?
Comment #11
anybodyYes, I think so @Dave Reid! :)
Comment #14
mikemiles86Merge request created that re-rolls the patch for the 8.x-2.x version.
Comment #15
johan den hollander commentedMarking this as Needs review.
Tested the latest MR which works well to fix the problem with the latest 2.13 release.
Comment #16
recrit commentedThe patch and MR need updated to address the issue described in #7
Regarding the comment in #9: You can have more than one dialog open at a time. If have nested entities using the entity browser to edit or select the reference fields on them.