[wp-trac] [WordPress Trac] #31014: Blank space above widgets in Customizer

WordPress Trac noreply at wordpress.org
Sun Mar 29 06:19:32 UTC 2015


#31014: Blank space above widgets in Customizer
--------------------------+-----------------------------
 Reporter:  pavelevap     |       Owner:  ocean90
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  Future Release
Component:  Customize     |     Version:  4.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  ui, javascript
--------------------------+-----------------------------
Changes (by westonruter):

 * keywords:  needs-patch => has-patch
 * owner:   => ocean90
 * status:  new => reviewing


Comment:

 Replying to [comment:11 ocean90]:
 > The issue is that `api.Panel.onChangeExpanded()` fires before the widget
 panel is added to the DOM/correct position. That results in
 `content.offset().top` returning 0.

 Thanks so much for that! With that information, the fix seems to be as
 simple as making sure that the parent `li` is shown before attempting to
 calculate its position. Along with this, I found that the logic for
 focusing on a panel needed to be changed so that when it was expanded that
 we focus on the contents of the panel as opposed to the first focusable
 element within the panel's element, which would be the hidden panel label:
 on small screens the result here is the panel being initially scrolled out
 of view, as the panel's `li` got the focus as opposed to the the panel's
 negative margin-top contents.

 See [attachment:31014.2.diff].

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31014#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list