[wp-trac] [WordPress Trac] #54308: Customizer: Can't crop header images

WordPress Trac noreply at wordpress.org
Fri Feb 11 09:43:44 UTC 2022

#54308: Customizer: Can't crop header images
 Reporter:  alshakero                |       Owner:  alshakero
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  6.0
Component:  Customize                |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  ui, javascript

Comment (by arthur791004):


 I also dive into this issue and found that the root cause is the
 `doResize` function is triggers before x1, x2, y1, y2 are initialized.
 Then, it causes the calculation for `x1 = min(x1, left + imgWidth);`
 results `NaN`. (See https://github.com/WordPress/wordpress-
 Therefore, there is no cropping selection at the beginning.

Ticket URL: <https://core.trac.wordpress.org/ticket/54308#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list