Closed Bug 196748 Opened 22 years ago Closed 21 years ago

text cursor off by one at end of string in text box; XORs with last character, sometimes hard to read

Categories

(Core :: DOM: Editor, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 98564

People

(Reporter: danielbarclay.oss, Assigned: mozeditor)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20030210 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20030210 In a text box for an input element of type "text", when the insertion point is after the last character, the text cursor seems to be drawn one pixel to the left(*) of where it should be. For small fonts, the overlap of the text cursor with the last character frequently makes that last character unreadable. (*Assuming a left-to-right language.) Reproducible: Always Steps to Reproduce: 1. Display a web page with a text box (<input type="text" ...>) or a text area ("<textarea ...>"). A box or area with a small, non-serif font show the problem more clearly. The Summary box on this Mozilla bug-reporting page seems to a good example (at least with my font-size settings). 2. In the text box or text area, enter a three or four instances of the same narrow character (e.g., "l", "i" ). 3. Position the text cursor between an adjacent pair of characters. Notice whether and how the text cursor overlaps the preceding character. 4. Position the text cursor between another adjacent pair of characters. Notice that the cursors position with this pair's preceding characters is the same as in step 3. 5. Now position the text cursor at the end of the string. Notice how it overlaps the preceding character differently, being one pixel further to the left (relative to that preceding character) than in the previous two cases. Actual Results: The text cursor overlaps the last column of pixels of the last character. With a small character (and especially with a sans-serif font), that last character can be hard to read. Expected Results: I would think you'd want the text cursor to be positioned consistently, and to not obscure the last character. Given that cursor positioning with a string seems to be okay, and given that the change only occurs at the end of the string, I'd guess that there is an off-by-one error in code that knows about the end of the string.
core editor
Assignee: form → jfrancis
Component: Layout: Form Controls → Editor: Core
QA Contact: desale → sairuh
dupe *** This bug has been marked as a duplicate of 98564 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.