Opened 10 years ago
Closed 7 years ago
#27757 closed defect (bug) (duplicate)
Headers in Customizer - different thumbnail size
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | normal | Version: | 3.9 |
Component: | Customize | Keywords: | |
Focuses: | Cc: |
Description
Please see attached screenshot.
After changing header image in Customizer, height 69px is applied.
But when you come back to Customizer (reload), Current header thumbnail has height only 40px.
Attachments (1)
Change History (8)
#3
@
10 years ago
Twenty Eleven, no plugins, Chrome.
Steps to reproduce:
1) Go to Customizer, select any of default header images from 2011.
2) Save and publish changes. Everything is OK, selected header image has height 69px.
3) Go away, for example to Dashboard.
4) Go to Customizer and you will see that Current header image is crippled and has only 40px height.
#4
@
10 years ago
- Keywords 2nd-opinion removed
- Priority changed from normal to low
Confirmed with the steps from pavelevap. 40px is applied via style="height: 40px;"
to .container
. Thumbnail has the same size, the container allows only 40px.
The issue is getHeight()
: trunk/src/wp-includes/js/customize-views.js#L33
setPlaceholder()
is called 3 times:
When called for the first time in getHeight()
the result of this.$el.find('img')
is empty and falls back to 40px, this value is stored as a model attribute in savedHeight
.
The second call is the same as the first one. (No idea why.)
On the third call this.$el.find('img')
has found the image, but image.height()
returns 0 and so it falls back to the savedHeight
attribute, which is 40px.
#5
@
9 years ago
I did managed to reproduce with the steps given above ( v4.2.2 ). It's "working" with img.addEventListener('load', loadHandler), although it is not a good workaround.
I was unable to reproduce the issue, the 40px height is set every time. Which theme are you testing against and are there any active plugins?