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:
parent
a10598acd0
commit
7f326f92a5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user