Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#36050 closed defect (bug) (fixed)

Customizer: gap above widget section when focusing from preview shift+click

Reported by: mattwiebe Owned by: westonruter
Priority: normal Milestone: 4.5
Component: Customize Version: 4.4
Severity: normal Keywords: has-patch has-screenshots
Cc: Focuses: ui

Description

When focusing on a widget via shift+click in the preview iframe, the widget area panel will render with an incorrect margin-top, producing a large, ugly space.

Steps to reproduce:

  1. Open the Customizer
  2. Shift + click on any widget area
  3. See a large gap above the widget's widget area section

Note that this stops happening every time after you've been navigating through other sections/panels in the Customizer. Focusing on a widget first produces reliable results. Screenshot and patch incoming.

Attachments (2)

36050.diff​ (512 bytes ) - added by mattwiebe 11 years ago.
widget-margin-bug.png​ (31.5 KB ) - added by mattwiebe 11 years ago.

Download all attachments as: .zip

Change History (7)

@mattwiebe
11 years ago

#1 @mattwiebe
11 years ago

  • Keywords has-patch has-screenshots added

All the diff does is move section._recalculateTopMargin() into a setTimeout call with a 0ms timeout to bump it to the top of the call stack, since it's otherwise making calculations based on not quite current layout.

#2 @ocean90
11 years ago

Related: #34391

This ticket was mentioned in ​Slack in #core-customize by melchoyce. ​View the logs.


11 years ago

#4 @westonruter
11 years ago

  • Milestone Awaiting Review → 4.5
  • Owner set to westonruter
  • Status new → accepted

I've been noticing this increasingly as well. It seems to be specifically when focusing on a section (or a control within a section) that is within a panel. It also seems to only happen when the contained panel was previously collapsed. If you collapse the section and re-expand it, subsequent focuses on other sections within that panel seem to not have the glitch.

#5 @westonruter
11 years ago

  • Resolution → fixed
  • Status accepted → closed

In 36805:

Customize: Remove gap above section contained in panel when initially focusing on control.

Props mattwiebe.
Fixes #36050.

Note: See TracTickets for help on using tickets.