Pressing accesskey for label should focus the target element after the label click event. b=346529 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@206645 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1222,9 +1222,11 @@ nsEventStateManager::HandleAccessKey(nsPresContext* aPresContext,
|
||||
}
|
||||
} else { // otherwise, it must be HTML
|
||||
// It's hard to say what HTML4 wants us to do in all cases.
|
||||
// So for now we'll settle for A) Set focus
|
||||
ChangeFocusWith(content, eEventFocusedByKey);
|
||||
|
||||
// So for now we'll settle for A) Set focus (except for <label>s
|
||||
// which focus their control in nsHTMLLabelElement::PostHandleEvent)
|
||||
if (content->Tag() != nsHTMLAtoms::label || !sKeyCausesActivation) {
|
||||
ChangeFocusWith(content, eEventFocusedByKey);
|
||||
}
|
||||
if (sKeyCausesActivation) {
|
||||
// B) Click on it if the users prefs indicate to do so.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user