[wp-trac] [WordPress Trac] #35657: Image height calculation not always available on body.load
WordPress Trac
noreply at wordpress.org
Tue Jul 5 14:07:36 UTC 2016
#35657: Image height calculation not always available on body.load
--------------------------+-------------------------
Reporter: jipmoors | Owner: swissspidy
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 4.6
Component: Embeds | Version: 4.4
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: javascript
--------------------------+-------------------------
Changes (by ocean90):
* keywords: has-patch commit => needs-patch
* status: closed => reopened
* focuses: => javascript
* resolution: fixed =>
Comment:
Before adding the event listener we have to check whether the query was
successful. Otherwise it will produce an JS error:
> Uncaught TypeError: Cannot read property 'addEventListener' of null
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35657#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list