WordPress.org

Make WordPress Core

Opened 3 weeks ago

Last modified 3 weeks ago

#51484 new defect (bug)

A meta box can be prevented from being returned to its original position

Reported by: johnbillion Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Editor Keywords: needs-patch
Focuses: javascript, administration Cc:

Description

Given a site with an advanced meta box and a side meta box on the post editing screen, if the side meta box is moved into the advanced position it's not possible to move it back to the side. Tested both with drag and drop and by clicking the up/down position arrows introduced in 5.5.

Steps to reproduce:

  1. Add the following to a plugin:
add_action( 'add_meta_boxes', function() : void {
	\add_meta_box(
		'test-advanced',
		'Advanced',
		function() {
			echo 'Advanced';
		},
		'post',
		'advanced'
	);
	\add_meta_box(
		'test-side',
		'Side',
		function() {
			echo 'Side';
		},
		'post',
		'side'
	);
} );
  1. Load the post editing screen and confirm one advanced and one side meta box are present.
  2. Move the side meta box into the advanced section, either by clicking its "up" arrow or by dragging and dropping it.
  3. Reload the post editing screen (required step).
  4. Observe that it's not possible to move the side meta box back to the sidebar. It can't be dragged into the sidebar, and its down button is disabled.

This does not affect the classic editor, even if you're silly enough to move all the side meta boxes over into the advanced section.

Change History (1)

#1 @johnbillion
3 weeks ago

  • Summary changed from A side meta box can be prevented from being returned to the side to A meta box can be prevented from being returned to its original position

Update: The opposite is true too. If you move the advanced meta box into the side and reload the page, it cannot be moved back.

Note: See TracTickets for help on using tickets.