|
1 <!DOCTYPE html> |
|
2 <html> |
|
3 <head> |
|
4 <meta charset="utf-8"> |
|
5 <title>HTML Test: textarea with dir=auto, all N+EN</title> |
|
6 <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"> |
|
7 <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com"> |
|
8 <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute"> |
|
9 <link rel="help" href="http://dev.w3.org/csswg/css3-writing-modes/#unicode-bidi0"> |
|
10 <meta name="assert" content=" |
|
11 When dir='auto', the direction is set according to the first strong character |
|
12 of the text. |
|
13 For textarea and pre elements, the heuristic is applied on a per-paragraph level. |
|
14 If there is no strong character, as in this test, the direction defaults to LTR."> |
|
15 <style> |
|
16 body { text-align:left } |
|
17 textarea { |
|
18 font-size:18px; |
|
19 text-align:left; |
|
20 resize: none; |
|
21 } |
|
22 .ref { |
|
23 border: medium solid gray; |
|
24 width: 400px; |
|
25 margin: 20px; |
|
26 } |
|
27 .comments { |
|
28 display: none; |
|
29 } |
|
30 </style> |
|
31 </head> |
|
32 <body> |
|
33 <div class="comments"> |
|
34 We use text-align:left because neither the dir="auto" nor the unicode-bidi:plaintext |
|
35 specification states whether text-align:start and text-align:end should obey the paragraph |
|
36 direction or the direction property in a unicode-bidi:plaintext element. |
|
37 The ...! paragraph, being neutral, is supposed to be displayed LTR (i.e. as ...!, not as !...) |
|
38 despite both the paragraph before it and the paragraph after it being all-RTL, which makes the |
|
39 element as a whole RTL. |
|
40 </div> |
|
41 <div class="ref"> |
|
42 <div dir="ltr"> |
|
43 <textarea rows="5" dir="ltr">@123! |
|
44 א |
|
45 ...! |
|
46 א |
|
47 </textarea> |
|
48 </div> |
|
49 <div dir="rtl"> |
|
50 <textarea rows="5" dir="ltr">@123! |
|
51 א |
|
52 ...! |
|
53 א |
|
54 </textarea> |
|
55 </div> |
|
56 </div> |
|
57 </body> |
|
58 </html> |