#32109 closed defect (bug) (fixed)
Emoji: JavaScript error in Internet Explorer 9 and 10
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.2.2 | Priority: | normal |
Severity: | normal | Version: | 4.2 |
Component: | Formatting | Keywords: | fixed-major has-patch |
Focuses: | javascript | Cc: |
Description
There is a javascript error in wp-includes/js/twemoji.min.js. The problem appears in Internet Explorer 9 and 10.
Unable to get property 'childNodes' of undefined or null reference.
Attachments (4)
Change History (19)
This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.
10 years ago
#3
@
10 years ago
Looks like wp-emoji.js
was passing document.body to be parsed before it existed.
Per discussion in slack, I've changed the IE8 check to for IE8, IE9 or IE10.
As a fail safe, in the looping waiting for twemoji to load, I've added a check that document.body is defined.
#4
@
10 years ago
32109.1.diff changes all IE < 11 to wait for body.onload which can fire much later if there is a slow loading image, etc.
A better solution seems to be to use DOMContentLoaded
which is supported everywhere except IE < 9. Then keep document.readyState === 'complete'
for IE8. For this we will need to set a var in case DOMContentLoaded
fires before wp-emoji.js is loaded.
#5
@
10 years ago
In 32109.2.diff:
- Use
DOMContentLoaded
to initialize wp-emoji. - Use
readystatechange
anddocument.readyState === 'complete'
as fallback in caseDOMContentLoaded
is not supported (IE < 9 and other really outdated browsers).
Tested in Firefox, Chrome, IE11, IE8. Needs testing in IE10 and 9 just in case, and perhaps in other obscure browsers if somebody has one handy.
#6
@
10 years ago
WFM on BrowserStack instances of:
Win7/IE10
Win7/IE9
Win7/FF3.6
Win7/Old Safaris and Operas
Win8/IE10
Win8/IE10metro
#7
@
10 years ago
- Milestone changed from Awaiting Review to 4.2.1
In 32109.3.diff: use the same events as jQuery( document ).ready()
(the compat branch).
Tested in Firefox, Chrome, IE11 and 8. Still good to test in native/not-emulated browsers.
This ticket was mentioned in Slack in #core by ocean90. View the logs.
10 years ago
#10
@
10 years ago
- Owner set to azaozz
- Resolution set to fixed
- Status changed from new to closed
In 32334:
#11
@
10 years ago
- Keywords fixed-major added; needs-testing removed
- Resolution fixed deleted
- Status changed from closed to reopened
Reopen for 4.2.
Ensure document.body is defined