Problem/Motivation

This is a follow-up to #2913798: Add "Replace" button to form display. There, a new "Replace" button was allowed in the field widget configuration, which basically empties the current selection and opens the browser again, allowing the user to select a new entity.

However, if the user cancels the modal without performing any selection, the field ends up with an empty selection. This could be seen as a UX issue in certain cases.

Proposed resolution

Try to clear the current selection only when a new selection is effectively made.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

marcoscano created an issue. See original summary.

miro_dietiker’s picture

Title: Prevent cleaning current selection if user aborts replace operation » Prevent clearing current selection if user aborts replace operation
shadysamir’s picture

What is the status of this issue? I am trying to prevent this behavior in a site I'm working on