Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #27757, comment 4


Ignore:
Timestamp:
04/13/2014 01:18:32 PM (10 years ago)
Author:
ocean90
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27757, comment 4

    initial v1  
    11Confirmed with the steps from pavelevap. 40px is applied via `style="height: 40px;"` to `.container`.  Thumbnail has the same size, the container allows only 40px.
     2
     3The issue is `getHeight()`: [source:trunk/src/wp-includes/js/customize-views.js#L33]
     4
     5`setPlaceholder()` is called 3 times:
     6When 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`.
     7The second call is the same as the first one. (No idea why.)
     8On 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.