Closed Bug 87133 Opened 23 years ago Closed 23 years ago

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

Categories

(Core :: DOM: Editor, defect, P2)

x86
All
defect

Tracking

()

VERIFIED FIXED
mozilla0.9.2

People

(Reporter: kinmoz, Assigned: kinmoz)

Details

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

Attachments

(2 files)

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.
Attached file Selection test case.
this is a must fix bug -- not being able to select lines of text is not acceptable
Severity: normal → major
Priority: -- → P2
Target Milestone: --- → mozilla0.9.2
adding QAHP...
Whiteboard: [QAHP]
cc: shrir.
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=
r=waterson
sr=blizzard
Whiteboard: [QAHP] FIX IN HAND, need r=, sr=, and a= → [QAHP] FIX IN HAND, reviewed, need a=
Its GrrrreaT! looks good thanks kin! r=mjudge
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
Closed: 23 years ago
Resolution: --- → FIXED
Whiteboard: [QAHP] FIX IN HAND, reviewed, need a= → [QAHP] fixed, reviewed, approved
Kin, can you verify if this is fixed on the branch?
thanks.
verified in 6/25 builds.
Status: RESOLVED → VERIFIED
*** 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.

Attachment

General

Creator:
Created:
Updated:
Size: