Closed Bug 18002 Opened 25 years ago Closed 25 years ago

[M11 BLOCKER][DOGFOOD] Editor stops accepting key input if word exceeds line length

Categories

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

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: kinmoz, Assigned: kinmoz)

References

Details

(Whiteboard: [PDT+] verify in 11/8 build.)

The editor stops accepting key input when typing a word that exceeds the current
line length. This happens on both Windows and Linux.

To reproduce:

1. Start the editor with a blank page.

2. Keep typing any non-space character till the text hits the right edge of the
content area and a horizontal scrollbar appears.

At this point, you would expect the content area to scroll to the left as you
type so that you can see what you are typing, but it doesn't.

If you place the caret in any of the visible text and type something, nothing
happens.

The editor is not receiving Key Events at this point.

If you
Priority: P3 → P1
Just thought I'd mention that this used to work, so it is a regression.
Sure enough.  On gtk, the key event is getting generated, but it doesn't make it
as far as nsTextEditorKeyListener::KeyPress; someone else must be consuming the
event, or routing it somewhere else, before it gets to the editor.
Right, I'm currently tracing the key event path through the XP event handling
code to see who the culprit is.
Status: NEW → ASSIGNED
Summary: [DOGFOOD] Editor stops accepting key input if word exceeds line length → [M11 BLOCKER][DOGFOOD] Editor stops accepting key input if word exceeds line length
Target Milestone: M11
Accepting bug. Marking as M11 blocker per beppe@netscape.com.
Severity: normal → blocker
Setting Severity to blocker.
kipp@netscape.com checked in a change to the method
nsContainerFrame::GetFrameForPointUsing() that corrects the algorithm used for
selecting a frame that contains a point to fix bug #1413.

    mozilla/layout/html/base/src/nsContainerFrame.cpp  revision 1.68

Before kipp's change, the call to GetFrameForPoint() in PresShell::HandleEvent()
would always return the RootFrame's child AreaFrame which had a content node
associated with it, so PresShell::HandleEvent() was able to call the content
node's HandleDOMEvent() method.

After kipp's change, GetFrameForPoint() returns the RootFrame, which has no
content node associated with it when the content area is larger than the
viewable area. This prevents us from calling HandleDOMEvent(), so the editor
can't process the key.

Kipp's change is okay, it just exposes the fact that our applications are not
using the EventStateManager FocusedContent tracking mechanism. It looks like the
EventStateManager's FocusedContent member is always NULL. This forces
nsPresShell::HandleEvent() to send all events including KeyEvents, through
the code that selects the frame to handle an event based on the Event's point.
The point in a KeyEvent structure is meaningless, in fact it is always (0,0).

Kipp has given me permission to back out his change for M11 so that we can get
it out the door. After M11 branches, I will check his fix back in so that we can
fix the problem properly.
*** Bug 18028 has been marked as a duplicate of this bug. ***
Adding lchiang, amusil and scalkins to CC as this affects AIM team.
Whiteboard: [PDT+]
Putting on PDT+ radar.
Whiteboard: [PDT+] → [PDT+] Waiting for code review approval from kipp@netscape.com
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
I checked in a change to

    mozilla/layout/html/base/src/nsContainerFrame.cpp  revision 1.69

that backs out Kipp's fix for bug #1413 temporarily. I reenable his fix after
M11 branches and either reopen this bug, or file a new one, with dependencies on
a third bug that makes reference to the fact that the event manager is not
tracking focus content changes in the editor or textareas.
Whiteboard: [PDT+] Waiting for code review approval from kipp@netscape.com → [PDT+]
Cleared comment in whiteboard status field.
Depends on: 18092
Whiteboard: [PDT+] → [PDT+] verify in 11/8 build.
Blocks: 12658
linking to PDT+ tracking bug 12658
Status: RESOLVED → VERIFIED
verified in 11/8 build.
This bug needs to be re-verified.

Fix checked into tip:

    mozilla/layout/html/base/src/nsContainerFrame.cpp revision: 1.73

Modified Kipp's fix for #1413 so that nsContainerFrame::GetFrameForPointUsing()
looks through any outside children even if it finds a normal child containing
aPoint.

r=joki@netscape.com
Status: VERIFIED → REOPENED
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
I'll reopen this bug for the re-verification.
Status: RESOLVED → VERIFIED
verified in 11/29 build.
You need to log in before you can comment on or make changes to this bug.