"Home" doesn't work in Composer

VERIFIED FIXED in mozilla0.9.2

Status

()

Core
Editor
P3
normal
VERIFIED FIXED
17 years ago
7 years ago

People

(Reporter: Jocelyn Bishop, Assigned: mjudge)

Tracking

Trunk
mozilla0.9.2
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(2 attachments)

(Reporter)

Description

17 years ago
When trying to highlight a line of text I "Shift/Home" or, when trying to move
from the end of text to the beginning, I hit "Home". In Composer 6.1Beta it
doesn't work 90% of the time. At first I thought I was hitting "Ctrl"
accidcentally, but I made sure to check next time it didn't work, and I was
hitting "Shift". Basically nothing would happen. I would use the mouse to click
the cursor to the beginning of the line, and hitting "End" or Shift/End" would work.

Comment 1

17 years ago
additional comments from Jocelyn:

Home" does not work if "Shift/Home" did not work. The cursor will be blinking at
the end of the
line, and the window will be active, but niether "Home" nor "Shift/Home" will
work. This is not
100% of the time, but once it fails to work, it doesn't work in any combination. 

Comment 2

17 years ago
Are arrow keys disable too when that happens? There was a recent bug that cauld
cause home, end, and the arrow keys to get stuck, and the patch for it may not
have gone in in time for NS 6.1 beta

Comment 3

17 years ago
mike has a bug on this I believe -- assigning to him and adding mcafee
Assignee: beppe → mjudge
Whiteboard: [keybnd]

Comment 4

17 years ago
Created attachment 39545 [details]
reduced testcase

Comment 5

17 years ago
cc: kmurray

Comment 6

17 years ago
With the reduced test case, I can see that nsFrame::PeekOffset() is failing 
because it fetches the first frame on the line which happens to be an 
nsTextFrame containing invisible formatting text ... so when it calls 
firstFrame->GetContentAndOffsetsFromPoint() it throws an error because 
firstFrame has no text that renders.

So it seems like HOME will always fail if a line begins with a text node that 
contains only formatting white space ... for example "<br>  <b>line 2</b>" or 
"<p>  <b>foo</b>"

I think PeekOffset() has to find the first frame with visible content on the 
line before calling GetContentAndOffsetsFromPoint.

Comment 7

17 years ago
yeah..testcases catches the bug on my NT

Comment 8

17 years ago
This bug is cross-platform.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 98 → All
Priority: -- → P3
Hardware: PC → All

Updated

17 years ago
Target Milestone: --- → mozilla0.9.3
(Assignee)

Comment 9

17 years ago
SIMPLE FIX. need to search for a valid landing for the HOME key. END key 
allready does this. just added a while loop with a secure fail safe to search 
for the first valid frame on the line.

r=anthonyd
Status: NEW → ASSIGNED
Whiteboard: [keybnd] → [keybnd] FIXINHAND need sr=,a=
(Assignee)

Comment 10

17 years ago
Created attachment 39570 [details] [diff] [review]
patch

Comment 11

17 years ago
sr=kin@netscape.com with the change we discussed on AIM.
(Assignee)

Comment 12

17 years ago
made small change. i am moving to 9.2 and i want approval. this is a simple fix 
to make us not look dumb.
Target Milestone: mozilla0.9.3 → mozilla0.9.2

Updated

17 years ago
Whiteboard: [keybnd] FIXINHAND need sr=,a= → [keybnd] fixed, reviewed, need a=

Comment 13

17 years ago
a= asa@mozilla.org for checkin to 0.9.2.
(on behalf of drivers)
Whiteboard: [keybnd] fixed, reviewed, need a= → [keybnd] fixed, reviewed, need a= critical for 0.9.2

Updated

17 years ago
Whiteboard: [keybnd] fixed, reviewed, need a= critical for 0.9.2 → [keybnd] fixed, reviewed, approved
(Assignee)

Updated

17 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
(Assignee)

Comment 14

17 years ago
its in

Comment 15

17 years ago
verified in 6/22 build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.