https://bugzilla.wikimedia.org/show_bug.cgi?id=30130

--- Comment #27 from Roan Kattouw <[email protected]> 2011-09-09 13:41:59 
UTC ---
(In reply to comment #25)
> Another is to do the string replacement directly and not use the selection at
> all... except on IE, it looks like jquery.textSelection's replacement actually
> works by taking the entire textarea contents as a string, substringing some
> pieces, and replacing the entire string anyway -- so it's only going awry
> because the selection position gets moved from what we asked for.
> 
You seem to have this backwards, but your wording is ambiguous. Substringing
and replacing is what we do in *non*-IE browsers. IE actually has a way to
replace just the selection.

> (There is surprisingly no standard DOM-ish way to say "replace the selected
> text with this value, without changing the other megabyte of text in this
> textarea"!)
Yes, this is extremely annoying. There is a standard DOM way to replace
selected *elements* (which of course doesn't work in IE but never mind that),
but not to replace selections *entirely within* an element.

(In reply to comment #26)
> (In reply to comment #24)
> > r96415 fixes it, but in a hacky and slow way. What is the caret position
> > problem exactly?
> 
> Example:
> 
> Consider "म्", it is a combined character having two individuals. If we try to
> select range (1, 2), webkit will end up returning selection (2, 2).
> 
> So we will be unable to transform, for example, "म्" to "मु" by doing
> replacement in the range (1, 2) with "ु", result will be "म्ु".
Yes, I understand why WebKit setting the selection wrong is a problem. What I
don't understand is how the patches you attached fail to address the bug: what
parts of the bug do they not address?

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to