You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Safari 16 crashes on in-template DOM manipulation #5147
After the new IOS 16, Safari changed the behavior of document.adoptNode when called on a template. It's not changing the ownerDocument any more. It leaves this on an empty document (about:blank).
This causing an error at the function contains at this line, because the documentElement property is null on an empty document (about:blank).
If you change this line from var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode;
to var adown = a.nodeType === 9 && a.documentElement ? a.documentElement : a, bup = b && b.parentNode;
it's working again.
Activity
jded76 commentedon Oct 23, 2022
I made a repository if you like to test it without fiddler.
If you change this line to use the local jquery file
<script src="jquery-3.5.1.js"></script>the error is gone.[-]Problem with Safari 16+[/-][+]Safari 16 crashes on in-template DOM manipulation[/+]Selector:Manipulation: Fix DOM manip within template contents
Selector:Manipulation: Fix DOM manip within template contents
mgol commentedon Nov 14, 2022
Reopening until the fix lands in Sizzle and - then - on
3.x-stable.Core: Make Sizzle.contains work within <template/> elements
5 remaining items
Selector: Update Sizzle from 2.3.7 to 2.3.8
Selector:Manipulation: Fix DOM manip within template contents
Selector:Manipulation: Fix DOM manip within template contents
Selector:Manipulation: Fix DOM manip within template contents
Selector: Update Sizzle from 2.3.7 to 2.3.8
Selector:Manipulation: Fix DOM manip within template contents
mgol commentedon Nov 16, 2022
Landed on
mainin 3299236 and on3.x-stablein a1b7ae3 (commit updating Sizzle, includes the fix from jquery/sizzle@759acc7) & 5318e31. Closing.Selector:Manipulation: Fix DOM manip within template contents
Selector:Manipulation: Fix DOM manip within template contents
Selector:Manipulation: Fix DOM manip within template contents
Selector:Manipulation: Fix DOM manip within template contents