| <!DOCTYPE html> |
| <html class="reftest-wait"> |
| <meta charset="utf-8"> |
| <title>text-overflow: <string> in a textarea that becomes narrower</title> |
| <link rel="author" title="Minseong Kim" href="jja08111@gmail.com"> |
| <link rel="help" href="https://drafts.csswg.org/css-overflow-4/#text-overflow"> |
| <link rel="mismatch" href="text-overflow-string-in-textarea-dynamic-width-notref.html"> |
| <meta name="assert" content="A line that starts fitting and overflows after the textarea is narrowed is truncated with the text-overflow string."> |
| <style> |
| textarea { |
| width: 300px; |
| white-space: nowrap; |
| text-overflow: "[...]"; |
| } |
| </style> |
| <textarea>aaaaaaaaaaaaaaaa</textarea> |
| <script> |
| const textarea = document.querySelector('textarea'); |
| requestAnimationFrame(() => { |
| textarea.style.width = '100px'; |
| requestAnimationFrame(() => { |
| document.documentElement.classList.remove('reftest-wait'); |
| }); |
| }); |
| </script> |
| </html> |