Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Repro of a WebKit bug with iOS 10 Safari
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
</head>
<body>
<style>
.hover-me:hover {
color: red;
}
</style>
<div id="div1">
<a href="#" class="hover-me" onclick="alert('clicked link')">
I have to be clicked once!
</a>
</div>
<div id="div2">
<div id="div3">
<a href="#" class="hover-me" onclick="alert('clicked link')">
I have to be clicked twice...
</a>
</div>
</div>
<script>
document.getElementById('div1').attachShadow({ mode: 'open' }).innerHTML = `<slot></slot>`;
document.getElementById('div2').attachShadow({ mode: 'open' }).innerHTML = `<slot></slot>`;
document.getElementById('div3').attachShadow({ mode: 'open' }).innerHTML = `<slot></slot>`;
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.