[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):
Hello,
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-
develop/blob/968b3fc5a4aa9871ce8654b48502f8710fc804a1/src/js/_enqueues/vendor/imgareaselect/jquery.imgareaselect.js#L597).
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