[Webkit-unassigned] [Bug 44731] Extra Events triggered by <input> on focus

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 27 13:50:58 PDT 2010


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





--- Comment #4 from Joseph Pecoraro <joepeck at webkit.org>  2010-08-27 13:50:58 PST ---
Duplicate events also happen when tabbing to the input, not just via mousePress. This makes me think there is a more generic problem. It seems to me that if the focus changed during the dispatchEvent, than later on during the setSelection path, the node should not dispatch a focus event. Or maybe it should never at all. I have to learn more about what is going on.


Breakpoint 1, WebCore::HTMLInputElement::handleFocusEvent (this=0x1124321e0) at WebCore/html/HTMLInputElement.cpp:728

  (gdb) bt
  #0 WebCore::HTMLInputElement::handleFocusEvent at WebCore/html/HTMLInputElement.cpp:728
  #1 WebCore::HTMLTextFormControlElement::dispatchFocusEvent at WebCore/html/HTMLFormControlElement.cpp:487
  #2 WebCore::Document::setFocusedNode at WebCore/dom/Document.cpp:3070
  #3 WebCore::FocusController::setFocusedNode at WebCore/page/FocusController.cpp:627
> #4 WebCore::Element::focus at WebCore/dom/Element.cpp:1317
  #5 WebCore::FocusController::advanceFocusInDocumentOrder at WebCore/page/FocusController.cpp:285
  #6 WebCore::FocusController::advanceFocus at WebCore/page/FocusController.cpp:170
  #7 WebCore::EventHandler::defaultTabEventHandler at WebCore/page/EventHandler.cpp:2750
  #8 WebCore::EventHandler::defaultKeyboardEventHandler at WebCore/page/EventHandler.cpp:2388
  #9 WebCore::Node::defaultEventHandler at WebCore/dom/Node.cpp:3018
  #10 WebCore::HTMLFormControlElementWithState::defaultEventHandler at WebCore/html/HTMLFormControlElement.cpp:471
  #11 WebCore::HTMLInputElement::defaultEventHandler at WebCore/html/HTMLInputElement.cpp:2177
  #12 WebCore::Node::dispatchGenericEvent at WebCore/dom/Node.cpp:2747
  #13 WebCore::Node::dispatchEvent at WebCore/dom/Node.cpp:2631
  #14 WebCore::EventTarget::dispatchEvent at WebCore/dom/EventTarget.cpp:278
  #15 WebCore::EventHandler::keyEvent at WebCore/page/EventHandler.cpp:2325
  #16 WebCore::EventHandler::keyEvent at WebCore/page/mac/EventHandlerMac.mm:148
  #17 -[WebHTMLView at WebKit/mac/WebView/WebHTMLView.mm:4097
  #18 0x00007fff8678506f in -[NSWindow sendEvent:] ()


Breakpoint 1, WebCore::HTMLInputElement::handleFocusEvent (this=0x1124321e0) at WebCore/html/HTMLInputElement.cpp:728

  (gdb) bt
  #0 WebCore::HTMLInputElement::handleFocusEvent at WebCore/html/HTMLInputElement.cpp:728
  #1 WebCore::HTMLTextFormControlElement::dispatchFocusEvent at WebCore/html/HTMLFormControlElement.cpp:487
  #2 WebCore::Document::setFocusedNode at WebCore/dom/Document.cpp:3070
  #3 WebCore::FocusController::setFocusedNode at WebCore/page/FocusController.cpp:627
  #4 WebCore::Frame::setFocusedNodeIfNeeded at WebCore/page/Frame.cpp:592
  #5 WebCore::SelectionController::setSelection at WebCore/editing/SelectionController.cpp:156
  #6 WebCore::RenderTextControl::setSelectionRange at WebCore/rendering/RenderTextControl.cpp:262
  #7 WebCore::RenderTextControl::select at WebCore/rendering/RenderTextControl.cpp:233
  #8 WebCore::HTMLTextFormControlElement::select at WebCore/html/HTMLFormControlElement.cpp:564
  #9 WebCore::HTMLInputElement::select at HTMLInputElement.h:146
  #10 WebCore::InputElement::updateFocusAppearance at WebCore/dom/InputElement.cpp:95
  #11 WebCore::HTMLInputElement::updateFocusAppearance at WebCore/html/HTMLInputElement.cpp:707
> #12 WebCore::Element::focus at WebCore/dom/Element.cpp:1329
  #13 WebCore::FocusController::advanceFocusInDocumentOrder at WebCore/page/FocusController.cpp:285
  #14 WebCore::FocusController::advanceFocus at WebCore/page/FocusController.cpp:170
  #15 WebCore::EventHandler::defaultTabEventHandler at WebCore/page/EventHandler.cpp:2750
  #16 WebCore::EventHandler::defaultKeyboardEventHandler at WebCore/page/EventHandler.cpp:2388
  #17 WebCore::Node::defaultEventHandler at WebCore/dom/Node.cpp:3018
  #18 WebCore::HTMLFormControlElementWithState::defaultEventHandler at WebCore/html/HTMLFormControlElement.cpp:471
  #19 WebCore::HTMLInputElement::defaultEventHandler at WebCore/html/HTMLInputElement.cpp:2177
  #20 WebCore::Node::dispatchGenericEvent at WebCore/dom/Node.cpp:2747
  #21 WebCore::Node::dispatchEvent at WebCore/dom/Node.cpp:2631
  #22 WebCore::EventTarget::dispatchEvent at WebCore/dom/EventTarget.cpp:278
  #23 WebCore::EventHandler::keyEvent at WebCore/page/EventHandler.cpp:2325
  #24 WebCore::EventHandler::keyEvent at WebCore/page/mac/EventHandlerMac.mm:148
  #25 -[WebHTMLView at WebKit/mac/WebView/WebHTMLView.mm:4097
  #26 0x00007fff8678506f in -[NSWindow sendEvent:] ()

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



More information about the webkit-unassigned mailing list