[Webkit-unassigned] [Bug 25321] RLE/LRE characters are removed from any text entered into a text box (either using a keyboard or by pasting)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 19 11:12:00 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=25321
--- Comment #22 from Xiaomei Ji <xji at chromium.org> 2010-10-19 11:11:59 PST ---
Hi Mitz,
Thanks for the valuable suggestion!
I tried the change per your suggestion, which solves the bug.
But it has side-effect on caret-movement: unicode control characters might be considered as a character in caret movement.
For example:
<div contenteditable>start ‫car דהו אבג.‬ end</div>
The visual display looks like "...... car end".
You need to press right-arrow 4 times to move the caret from before 'r' to after 'e'. And it takes 4 left-arrow operations to move caret from after 'e' to before 'r'.
Firefox has similar issue: it takes 4 right-arrow operations to move caret from before 'r' to after 'e. And it takes 3 right-arrow operations to move caret from before ' car' to after 'c'. But left-arrow movement is ok (control characters are ignored).
Index: BidiResolver.h
===================================================================
--- BidiResolver.h (revision 69971)
+++ BidiResolver.h (working copy)
@@ -875,6 +875,7 @@
last = current;
+/*
if (emptyRun && !(dirCurrent == RightToLeftEmbedding
|| dirCurrent == LeftToRightEmbedding
|| dirCurrent == RightToLeftOverride
@@ -883,7 +884,14 @@
sor = current;
emptyRun = false;
}
+*/
+
+ if (emptyRun) {
+ sor = current;
+ emptyRun = false;
+ }
+
increment();
if (!m_currentExplicitEmbeddingSequence.isEmpty()) {
commitExplicitEmbedding();
@@ -901,6 +909,7 @@
}
}
+/*
if (emptyRun && (dirCurrent == RightToLeftEmbedding
|| dirCurrent == LeftToRightEmbedding
|| dirCurrent == RightToLeftOverride
@@ -911,6 +920,7 @@
last = current;
sor = current;
}
+*/
if (!pastEnd && (current == end || current.atEnd())) {
if (emptyRun)
--
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