Skip to content

Commit

Permalink
[css-ui-3] Add test text-overflow and pointer event interaction
Browse files Browse the repository at this point in the history
This is to reflect the spec change introduced by w3c/csswg-drafts#1637
  • Loading branch information
frivoal committed Aug 18, 2017
1 parent ffb718b commit b749ca8
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions css/css-ui-3/text-overflow-023.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>CSS Basic User Interface Test: interacting with the ellipsis</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<link rel="help" href="http://www.w3.org/TR/css3-ui/#text-overflow">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<meta name="flags" content="ahem interact dom should">
<meta name="assert" content="Pointer events on the ellipsis should be dispatched to the elided inline element if there's one, rather than directly to the block.">
<style>
#test {
overflow: hidden;
text-overflow: ellipsis;
margin-left: -100px;
width: 2.5em;
height: 1em;
white-space: pre;
font: 100px/1 ahem;
color: blue;
}
#discard {
float: left;
}
</style>

<div id=discard>First, click the blue box. </div>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="test"><span id="inner"> </span></div>
<script>
document.getElementById("test").addEventListener("click", red);
document.getElementById("inner").addEventListener("click", green)
function red() {
document.getElementById("test").style.color="red";
document.getElementById("discard").remove();
document.children[0].className="";
}
function green(e) {
document.getElementById("test").style.color="green";
document.getElementById("discard").remove();
document.children[0].className="";
e.stopPropagation();
}
</script>

0 comments on commit b749ca8

Please sign in to comment.