[wp-trac] [WordPress Trac] #32662: Customizer Menus: extra spacing above unsaved menu after it is first created
WordPress Trac
noreply at wordpress.org
Mon Jun 29 09:52:29 UTC 2015
#32662: Customizer Menus: extra spacing above unsaved menu after it is first
created
--------------------------+---------------------------
Reporter: designsimply | Owner: valendesigns
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.3
Component: Customize | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: ui
--------------------------+---------------------------
Comment (by valendesigns):
I spent some time with this issue tonight and figured out why it's
happening, but not how to fix it. The issue here is that when a panel or
section uses an `active_callback` to set the context and is hidden & above
the selected item before the calculations are made, but visible once the
page loads, the negative top margin of the container is incorrect.
I'm not sure how to approach this issue from that standpoint. It seems
like a delay of some kind is needed here. Though, what's an appropriate
delay and if we're forced to wait until the page loads to render the UI
for a section or panel is that trade off worth it?
My first thought is to patch the UI after the page loads like at `preview-
ready`, which is when the issue presents itself anyhow. At first you will
not notice anything wrong because the hidden panel or section is not
visible yet. So right when it becomes visible we need to fix the margin.
If we try and fix it earlier the UI breaks because it's still hidden.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32662#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list