Inline Entity Form widget partially works with Paragraphs embed
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3051750. --> Reported by: [taran2l](https://www.drupal.org/user/473438) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <h4>Prerequisites</h4> <ol> <li>Paragraph with an Entity Reference field</li> <li>Inline Entity Form widget for referencing (media for example)</li> <li>Allow adding exiting entities</li> </ol> <h4>How to reproduce</h4> <ol> <li>Create media entity (we will use it for referencing inside paragraph)</li> <li>Start embedding a paragraph</li> <li>Create a new paragraph</li> <li>Select any existing entity</li> <li><strong>Edit the referenced entity !</strong></li> <li>Save referenced entity</li> <li>Save paragraph</li> </ol> <p><strong>The referenced entity won't be updated</strong>, because:</p> <div class="codeblock"> <pre><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br>&nbsp;&nbsp;&nbsp; $actions</span><span style="color: #007700">[</span><span style="color: #DD0000">'submit'</span><span style="color: #007700">] = [<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: #DD0000">'#type' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'button'</span><span style="color: #007700">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: #DD0000">'#value' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">$button_value</span><span style="color: #007700">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: #DD0000">'#name' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'paragraphs_entity_embed_submit'</span><span style="color: #007700">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: #DD0000">'#ajax' </span><span style="color: #007700">=&gt; [<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: #DD0000">'callback' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'::submitForm'</span><span style="color: #007700">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: #DD0000">'wrapper' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'paragraphs-entity-embed-type-form-wrapper'</span><span style="color: #007700">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: #DD0000">'method' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'replace'</span><span style="color: #007700">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: #DD0000">'progress' </span><span style="color: #007700">=&gt; [<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: #DD0000">'type' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'throbber'</span><span style="color: #007700">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: #DD0000">'message' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ],<br>&nbsp;&nbsp;&nbsp; ];<br></span><span style="color: #0000BB">?&gt;</span></span></pre></div> <p>And <code>button</code> form element <strong>does not call</strong> submit handlers by default!</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Change submit button type to <code>submit</code> so submit handlers can run</p>
issue