ladybird/Tests/LibWeb/Text/input/invalidate-style-of-element-with-placeholder-shown-used-on-nested-element.html
Aliaksandr Kalenik 9f75e26385 LibWeb: Add missing handler in affected_by_invalidation_property()
...for :placeholder-shown pseudo-class.
2025-01-26 00:52:38 +01:00

25 lines
No EOL
567 B
HTML

<!DOCTYPE html>
<head>
<script src="include.js"></script>
<style>
#b input:placeholder-shown {
border: 2px dashed red;
background-color: #ffecec;
}
</style>
</head>
<body>
<div id="a"><input type="text" placeholder=""></input></div>
<script>
test(() => {
document.documentElement.offsetHeight; // force style recalculation
const a = document.getElementById('a');
a.id = 'b';
println("PASS (didn't crash)");
});
</script>
</body>
</html>