dir_auto-textarea-mixed.html (2381B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8" /> 5 <title>HTML Test: textarea with dir=auto, mixed L and R paragraphs</title> 6 <link rel="match" href="dir_auto-textarea-mixed-ref.html" /> 7 <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" /> 8 <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> 9 <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" /> 10 <link rel="help" href="http://dev.w3.org/csswg/css3-writing-modes/#unicode-bidi0" /> 11 <meta name="assert" content=" 12 When dir='auto', the direction is set according to the first strong character 13 of the text. 14 For textarea and pre elements, the heuristic is applied on a per-paragraph level." /> 15 <style> 16 body, textarea { 17 font-size:18px; 18 text-align:left; 19 } 20 textarea { 21 resize: none; 22 } 23 .test, .ref { 24 border: medium solid gray; 25 width: 400px; 26 margin: 20px; 27 } 28 .comments { 29 display: none; 30 } 31 </style> 32 </head> 33 <body> 34 <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> 35 <div class="comments"> 36 Key to entities used below: 37 ‎ - LRM, the invisible left-to-right mark (strongly LTR). 38 ‏ - RLM, the invisible right-to-left mark (strongly RTL). 39 We use text-align:left because neither the dir="auto" nor the unicode-bidi:plaintext 40 specification states whether text-align:start and text-align:end should obey the paragraph 41 direction or the direction property in a unicode-bidi:plaintext element. 42 </div> 43 <div class="test"> 44 <div dir="ltr"> 45 <textarea rows="5" dir="auto"> 46 !‏123‎@ 47 @‎123‏! 48 !123‏‎@ 49 @123‎‏! 50 </textarea> 51 </div> 52 <div dir="rtl"> 53 <textarea rows="5" dir="auto"> 54 @‎123‏! 55 !‏123‎@ 56 @123‎‏! 57 !123‏‎@ 58 </textarea> 59 </div> 60 </div> 61 <div class="ref"> 62 <div dir="ltr"> 63 <textarea rows="5" dir="rtl"> 64 !123@ 65 !123@ 66 !123@ 67 !123@ 68 </textarea> 69 </div> 70 <div dir="rtl"> 71 <textarea rows="5" dir="ltr"> 72 @123! 73 @123! 74 @123! 75 @123! 76 </textarea> 77 </div> 78 </div> 79 </body> 80 </html>