From 6a982b16f4df9a46d344bc79927b2a421c165dc1 Mon Sep 17 00:00:00 2001 From: "mats.palmgren%bredband.net" Date: Fri, 1 Dec 2006 17:18:34 +0000 Subject: [PATCH] Use the EventStateManager to focus the for-element. b=360009 r=zeniko sr=bzbarsky --- content/html/content/src/nsHTMLLabelElement.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/html/content/src/nsHTMLLabelElement.cpp b/content/html/content/src/nsHTMLLabelElement.cpp index 845c0f7ffc9c..90e9ed33f924 100644 --- a/content/html/content/src/nsHTMLLabelElement.cpp +++ b/content/html/content/src/nsHTMLLabelElement.cpp @@ -223,7 +223,8 @@ nsHTMLLabelElement::PostHandleEvent(nsEventChainPostVisitor& aVisitor) if (NS_IS_MOUSE_LEFT_CLICK(aVisitor.mEvent)) { if (ShouldFocus(this)) { // Focus the for content. - content->SetFocus(aVisitor.mPresContext); + aVisitor.mPresContext->EventStateManager()-> + ChangeFocusWith(content, nsIEventStateManager::eEventFocusedByKey); } // Dispatch a new click event to |content|