[Webkit-unassigned] [Bug 52176] DOM position at the boundary of LTR/RTL text inside a RTL/LTR block is wrong

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 19 11:35:02 PST 2011


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


Ryosuke Niwa <rniwa at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




--- Comment #10 from Ryosuke Niwa <rniwa at webkit.org>  2011-01-19 11:35:02 PST ---
(In reply to comment #8)
> I see. Like I said, this means that WebKit follows a certain convention for where to draw the insertion point when it’s at a directionality boundary, namely the Mac OS X text system convention. Other platforms may have other conventions. It might be good for WebKit ports to conform to the conventions of whatever platform they’re running on.

(In reply to comment #9)
> (In reply to comment #7)
> > Yes, or more precisely, puts the insertion point and the caret on the left.
> 
> “Insertion point” (as I used it above) is just Mac OS X terminology for “caret”. I will stick to “caret” from now on.

I meant insertion point in the sense of where the text was inserted but I was clearly wrong.  Internet Explorer and Firefox use WebKit convention when text is inserted.

e.g. suppose we have מלרע in a LTR block, and run:

var range = document.createRange();
editor().focus();
range.setStart(editor().firstChild, 0);
range.setEnd(editor().firstChild, 0);
window.getSelection().removeAllRanges();
window.getSelection().addRange(range);

setTimeout(function() {document.execCommand("insertHTML", false, "hello");}, 1000);

where editor() is the LTR div that contains the text. Then the caret shows up on the right of מלרע momentarily, but moves to the left when the text is inserted. So in this regard, Firefox & Internet Explorer's behavior matches that of WebKit. In fact, their behavior is more confusing than WebKit's so maybe we should convince them to change the behavior.

-- 
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