[wp-trac] [WordPress Trac] #41850: Customize: Prevent panel sticky headers when scrolling if description is expanded

WordPress Trac noreply at wordpress.org
Mon Oct 2 18:01:28 UTC 2017


#41850: Customize: Prevent panel sticky headers when scrolling if description is
expanded
--------------------------+-----------------------
 Reporter:  westonruter   |       Owner:  delawski
     Type:  defect (bug)  |      Status:  assigned
 Priority:  high          |   Milestone:  4.9
Component:  Customize     |     Version:  4.7
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------
Changes (by delawski):

 * keywords:  needs-patch => has-patch


Comment:

 @westonruter you were right about the cause of the issue. The header
 height was calculated only once when the container was first expanded.
 However, any time the help block was expanded, the actual height changed.
 Height value stored in the `data` attribute became invalid in such cases.

 Calculating the header height inside scroll event handler would cause
 performance issues.

 That's why a custom event is now issued each time a help block gets
 expanded or collapsed. This event triggers header height recalculation, so
 that an expensive `outerHeight()` function is called only when it's really
 needed.

 [https://core.trac.wordpress.org/attachment/ticket/41850/41850_2.patch
 Attached patch file]

 I'm also providing a link to the PR on GitHub:
 https://github.com/xwp/wordpress-develop/pull/270

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


More information about the wp-trac mailing list