Closed Bug 294619 Opened 20 years ago Closed 20 years ago

Soft hyphen (­) confuses selections

Categories

(Core :: DOM: Selection, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 213408

People

(Reporter: virkkila, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050306 Firefox/1.0.1 (Debian package 1.0.1-2) Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050306 Firefox/1.0.1 (Debian package 1.0.1-2) It seems the selection backedn counts ­ as a character while the rendering end does not. This causes the selected text not match what mozilla thinks is selected. If a word is selected that is three 5 letters and 3 (invisible) ­ charactes, totalling 8 characters, only the first 5 characters get selected. Reproducible: Always Steps to Reproduce: 1. Go to https://bugzilla.mozilla.org/attachment.cgi?id=906 2. Select the word "Unicode" (by dragging the pointer from the beginning of the word to the end of the word, not by double clicking) 3. Cut the text 4. Paste the text somewhere else Actual Results: The text is copied starting 3 letters too early (because the paragraph contains 3 softhypens before the word unicode). 7 characters from that point forward get copied (including the unicode char for &shy) Expected Results: The word "U-ni-code" should get copied, totalling 9 characters, not 7. And the selection should naturally start at the beginning of the word. A similar situation also arises when double clicking to highlight a word.
Isn't this for the same reason as why 'view selection source' doesn't show the same content as 'view source' ? The former is showing the DOM source, which seems to have stripped out ­ The former is only showing the visible text, not the original soruce code. I don't see an issue with the double-clicking, in the trunk version Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050516 Firefox/1.0+
*** This bug has been marked as a duplicate of 213408 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.