зеркало из https://github.com/mozilla/pjs.git
Pressing accesskey for label should focus the target element after the label click event. b=346529 r+sr=bzbarsky
This commit is contained in:
Родитель
d11e5563b1
Коммит
c62b26c2ec
|
@ -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.
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче