[Webkit-unassigned] [Bug 15117] New: REGRESSION: Message text isn't focused when reply or forward is clicked

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 30 12:47:09 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=15117

           Summary: REGRESSION: Message text isn't focused when reply or
                    forward is clicked
           Product: WebKit
           Version: 522+ (nightly)
          Platform: Macintosh
               URL: http://mail.google.com
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: Critical
          Priority: P1
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ruben at mailplaneapp.com


Click either "Reply" or "Forward" and the appearing message text isn't focused.
This happens about 20% to 50% of the time. When the focus isn't set, there is
no cursor shown in the message text. See attached screenshot.

This problem results in user confusion, or sometimes even to data loss: Users
click the link and then start typing. If they have enabled Gmail's keyboard
shortcuts, then their entries are interpreted as actions. (y will archive, x
will delete etc) 

Important: The problem doesn't occur when using the keyboard, e.g. pressing 'r'
for reply. Nor does it happen when you click the link and then immediately move
the mouse while the message text is opened.

I have tried to debug it and found this code to be the problem
(WebHtmlView.mm):

- (BOOL)acceptsFirstResponder
{
    // Don't accept first responder when we first click on this view.
    // We have to pass the event down through WebCore first to be sure we don't
hit a subview.
    // Do accept first responder at any other time, for example from keyboard
events,
    // or from calls back from WebCore once we begin mouse-down event handling.
    NSEvent *event = [NSApp currentEvent];
    if ([event type] == NSLeftMouseDown
            && !_private->handlingMouseDownEvent
            && NSPointInRect([event locationInWindow], [self convertRect:[self
visibleRect] toView:nil])) {
        return NO; // My Workaround is to return YES here.
    }
    return YES;
}

When it doesn't work, it is because this method returns NO. If I always return
YES, the error can't be duplicated.

If you enter 'r' to reply then it will return YES (keyboard event)
If you move your mouse right after the click then a NSMouseMouse Event will be
generated and a YES is the result (not a mouse down event).

My findings maybe very superficial - there may be a deeper problem that I don't
understand.

I marked this bug 
- REGRESSION, as it started to appear with html message text (old Safari has no
problem)
- CRITICAL as people are confused by the problem (Lot's of bug reports on my
side)


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list