[Webkit-unassigned] [Bug 20254] didBeginEditing / didEndEditing not always called on focus change

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 1 08:25:18 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=20254





------- Comment #1 from joe at staikos.net  2008-08-01 08:25 PDT -------
Created an attachment (id=22598)
 --> (https://bugs.webkit.org/attachment.cgi?id=22598&action=view)
Patch to fix this bug

The attached patch fixes this as follows:

Added Frame::textAreaDidBeginEditing and Frame::textAreaDidEndEditing to
parallel textFieldDidBeginEditing and textFieldDidEndEditing.  (Now
textAreaDidBeginEditing calls EditorClient::didBeginEditing, as before, while
textFieldDidBeginEditing calls EditorClient::textFieldDidBeginEditing.)

Remove the calls to didBeginEditing() and didEndEditing() in
Document::setFocusedNode.  They were not being called consistently. 
didBeginEditing and didEndEditing are now called from a DOM node's
dispatchFocusEvent or dispatchBlurEvent, the same as textFieldDidBeginEditing
and textFieldDidEndEditing.  (I think this change is safe because no
EditorClient implementation overrode these functions except EditorClientQt,
which just uses it to send the startInput and stopInput signals, which I've
tested extensively.)

Add a missed call to textFieldDidBeginEditing in
HTMLInputElement::dispatchFocusEvent.

Add calls to the new Frame::textAreaDidBeginEditing and
Frame::textAreaDidEndEditing to HTMLTextAreaElement to parallel the calls to
textFieldDidBeginEditing and textFieldDidEndEditing in HTMLInputElement.

Add a call to the new Frame::textAreaDidBeginEditing to
RenderTextControl::subtreeHasChanged to parallel the textFieldBeginEditing call
that's already there.


With these changes, EditorClient::didEditing and EditorClient::endEditing
should be called in exactly the same circumstances that
EditorClient::textFieldBeginEditing and EditorClient::textFieldEndEditing are,
except for textarea nodes instead of textfield nodes.


-- 
Configure bugmail: https://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