Can't select last few lines of text in an Editor

VERIFIED FIXED in mozilla0.9.2

Status

()

Core
Editor
P2
major
VERIFIED FIXED
17 years ago
16 years ago

People

(Reporter: kinmoz, Assigned: kinmoz)

Tracking

Trunk
mozilla0.9.2
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [QAHP] fixed, reviewed, approved)

Attachments

(2 attachments)

(Assignee)

Description

17 years ago
This bug has been driving me crazy for a while.

There seems to be a problem with selecting the last few lines of text in 
Composer (and it's variants) as well as textareas when the number of lines 
exceeds a multiple of 10 by 1 to 3 lines ... for example if you had 11 to 13 
lines, or 21 to 23 lines on the page you will not be able to click off the right 
edge of the last couple of lines to place the caret or extend the selection. You 
have to actually click *on* the text of the last few lines to place the caret or 
extend the selection.

A quick look in the debugger shows that 

I'll attatch a test case that demonstrates the problem.

In the test case, try clicking off the right side of the last line "Line 11". 
You'll notice that the caret get's placed on line 10 instead.
(Assignee)

Comment 1

17 years ago
Created attachment 39525 [details]
Selection test case.

Comment 2

17 years ago
this is a must fix bug -- not being able to select lines of text is not acceptable
Severity: normal → major
Keywords: correctness, nsCatFood, nsdogfood
Priority: -- → P2
Target Milestone: --- → mozilla0.9.2

Comment 3

17 years ago
adding QAHP...
Whiteboard: [QAHP]

Comment 4

17 years ago
cc: shrir.
(Assignee)

Comment 5

17 years ago
Created attachment 39614 [details] [diff] [review]
Patch that fixes the bug.
(Assignee)

Comment 6

17 years ago
I just attatched the patch that fixes this bug.

The patch fixes a couple of problems that I saw in 
nsBlockFrame::GetClosestLine():

  1. Negative start value when clicking on the first line.
  2. Failure to include last few lines during search if
     Total number of lines was odd. (This bug)
  3. Removed unused define and var.
  4. Added comments.
  5. Renamed countLines to numLines.

Fix is relatively safe. Can I get an r= and sr=?
Status: NEW → ASSIGNED
Whiteboard: [QAHP] → [QAHP] FIX IN HAND, need r=, sr=, and a=

Comment 7

17 years ago
r=waterson
sr=blizzard
(Assignee)

Updated

17 years ago
Whiteboard: [QAHP] FIX IN HAND, need r=, sr=, and a= → [QAHP] FIX IN HAND, reviewed, need a=

Comment 9

17 years ago
Its GrrrreaT! looks good thanks kin! r=mjudge
(Assignee)

Comment 10

17 years ago
Patch checked into MOZILLA_0_9_2_BRANCH:

    mozilla/layout/html/base/src/nsBlockFrame.cpp  revision 3.441.2.1

Patch checked into Trunk:

    mozilla/layout/html/base/src/nsBlockFrame.cpp  revision 3.442
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
Whiteboard: [QAHP] FIX IN HAND, reviewed, need a= → [QAHP] fixed, reviewed, approved

Comment 11

17 years ago
Kin, can you verify if this is fixed on the branch?
thanks.

Comment 12

17 years ago
verified in 6/25 builds.
Status: RESOLVED → VERIFIED
(Assignee)

Comment 13

17 years ago
*** Bug 83650 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.