mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-13 10:25:01 +00:00
Use the EventStateManager to focus the for-element. b=360009 r=zeniko sr=bzbarsky
This commit is contained in:
parent
5077e74e1e
commit
6a982b16f4
@ -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|
|
||||
|
Loading…
Reference in New Issue
Block a user