Make WordPress Core

Changeset 44240


Ignore:
Timestamp:
12/16/2018 10:26:30 PM (6 years ago)
Author:
SergeyBiryukov
Message:

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.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-admin/includes/post.php

    r44224 r44240  
    22112211    </form>
    22122212    <?php foreach ( $locations as $location ) : ?>
    2213         <form class="metabox-location-<?php echo esc_attr( $location ); ?>">
     2213        <form class="metabox-location-<?php echo esc_attr( $location ); ?>" onsubmit="return false;">
    22142214            <div id="poststuff" class="sidebar-open">
    22152215                <div id="postbox-container-2" class="postbox-container">
Note: See TracChangeset for help on using the changeset viewer.