Block Editor: Prevent the meta box form from being accidentally submitted.

Meta boxes are loaded inside a wrapper form, that the block editor submits as part of the saving process. It shouldn't be submitted manually.

Props pento.
Merges [43880] to trunk.
Fixes #45284.

git-svn-id: https://develop.svn.wordpress.org/trunk@44240 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2018-12-16 22:26:30 +00:00
parent a10598acd0
commit 7f326f92a5
1 changed files with 1 additions and 1 deletions

View File

@ -2210,7 +2210,7 @@ function the_block_editor_meta_boxes() {
<?php the_block_editor_meta_box_post_form_hidden_fields( $post ); ?>
</form>
<?php foreach ( $locations as $location ) : ?>
<form class="metabox-location-<?php echo esc_attr( $location ); ?>">
<form class="metabox-location-<?php echo esc_attr( $location ); ?>" onsubmit="return false;">
<div id="poststuff" class="sidebar-open">
<div id="postbox-container-2" class="postbox-container">
<?php