If you are using the Entity Browser, and you edit an embedded entity using the modal, this will trigger an additional entity form monitor check with the form inside the modal. If the modal does not close in time after the embedded entity dialog is saved, then it may trigger a refresh.

Comments

Dave Reid created an issue.

Dave Reid’s picture

I'm leaning towards we shouldn't inject the entity_form_monitor JS if we can detect the entity form is being displayed in a modal.

Dave Reid’s picture

Based on https://www.drupal.org/node/2488192, should be as simple as looking at the query of the current request.

Dave Reid’s picture

Although I'm confused, because if the entity being actively edited in the modal, were to be updated, we'd want to get the outdated form message in the modal, so we *do* want the processing in that case.

deviantintegral’s picture

Triggering a reload of an entity inside of a modal sounds tricky too. I'd agree with just not supporting it inside of the modal for now. Or, at least disabling the 'reload form' code and just showing a message. Or, could we trigger closeDialog / openDialog on the modal itself? It does sound like a complex set of code either way.