Previewing a Block that contains a form (Search form for example), then trying to add/update that Block breaks the Form submit handler. This makes sense, as having a
element within a
is not good and normally causes issues. We either need to disable the preview's form submit in JS, or figure out a way to render Blocks with Forms in them without a
element.

Comments

samuel.mortenson created an issue. See original summary.

samuel.mortenson’s picture

Status: Active » Needs review
StatusFileSize
new2.5 KB

The fix that I found was to remove the "form" #theme wrapper for any nested form within a preview. Unfortunately I could not find a JS solution to this problem. You can test the functionality of this patch by spamming "Toggle Preview" on any block plugin form in the "Forms" category.

samuel.mortenson’s picture

Status: Needs review » Postponed
samuel.mortenson’s picture

Status: Postponed » Needs review

Wrong issue, oops!

japerry’s picture

Status: Needs review » Reviewed & tested by the community

Looks good!

samuel.mortenson’s picture

Status: Reviewed & tested by the community » Fixed
japerry’s picture

done, fixed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.