Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-overflow/text-overflow-string-in-textarea-focused.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>text-overflow: <string> in a focused textarea</title>
<link rel="author" title="Minseong Kim" href="jja08111@gmail.com">
<link rel="match" href="text-overflow-string-in-textarea-focused-ref.html">
<meta name="flags" content="may">
<meta name="assert" content="The text-overflow string is not rendered while the textarea is focused, so that the full value can be edited.">
<!-- The specification says the UA "may" treat text-overflow as clip while
editing, but Chromium and Gecko do so for <textarea>, and WebKit,
which does not support text-overflow on <textarea>, does so for
<input>. -->
<style>
textarea {
white-space: nowrap;
text-overflow: "[...]";
caret-color: transparent;
}
</style>
<textarea>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</textarea>
<script>
document.querySelector('textarea').focus();
requestAnimationFrame(() => {
document.documentElement.classList.remove('reftest-wait');
});
</script>
</html>