[Webkit-unassigned] [Bug 37884] New: Cursor goes wrong direction in mixed RTL-LTR

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 20 13:04:40 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=37884

           Summary: Cursor goes wrong direction in mixed RTL-LTR
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Windows 7
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P3
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: bugs at dissociate.net
                CC: bugs at dissociate.net


Created an attachment (id=53870)
 --> (https://bugs.webkit.org/attachment.cgi?id=53870)
Example of mixed RTL+LTR in an RTL context.

Overview:

When you have mixed RTL-LTR text, cursoring uses the single direction of the
containing element, rather than the individual directions of the text runs
themselves.

(Unicode specifies a bidirectional algorithm for how to handle this, and the
*display* of text works fine, it's just the keyboard cursoring that is not
quite right)


Steps to Reproduce:


1) Make an editable RTL element with mixed RTL+LTR text in it.

e.g. <input type="text" style="direction: rtl;" size="40"
value="שָׁלוֹםhello"/>


2) Put your cursor in the Hebrew text, which is correctly at the right hand
beginning side of the text.


3) Press END


Actual Result:

- The cursor jumps to the *beginning* of "hello" at the far left side of all
the text


Expected Result:

- The cursor jumps to the *end* of "hello", which is in the middle visually,
between the RTL and the LTR.
- FF, IE and RTL Windows in general appear to get this right


Alternate Example of the Problem:

3) Instead of pressing END, press LEFT to go *forward* through the RTL text. 
Keep pressing LEFT to go forward, even when you are in LTR text. 


Actual Result:

- When the cursor gets to the "o" in "hello", it proceeds through the English
word *backwards*
i.e. the cursor is at "o", "l", "l", "e", "h"


Expected Result:

- When the cursor gets to the LTR text, it realizes the beginning of the LTR
text is over to the left starting with "h", not "o".  The cursor jumps to the
left and proceeds through "h" "e" "l" "l" "o" in response to the LEFT key.

- FF doesn't get this right, but Windows, Word, IE, etc.. do.


Build Date & Platform:
- Win7 Safari 4.0.5 (531.22.7)
- Win7 Chrome 4.1.249.1045


Additional Information:

The mixed direction characters display right, which is great, but the cursoring
code doesn't seem to have the same level of knowledge of the bi-directional
algorithm.  Please see below for more information:

http://www.w3.org/TR/html401/struct/dirlang.html#h-8.2.1


Thanks!

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list