mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Scroll <legend> into view when it receives focus. b=342372 r=aaronleventhal sr=bzbarsky
This commit is contained in:
parent
1dfad41191
commit
9aa2d8535b
@ -20,6 +20,7 @@
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Mats Palmgren <mats.palmgren@bredband.net>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
@ -254,9 +255,8 @@ nsHTMLLegendElement::SetFocus(nsPresContext* aPresContext)
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIEventStateManager> esm = aPresContext->EventStateManager();
|
||||
if (IsFocusable()) {
|
||||
esm->SetContentState(this, NS_EVENT_STATE_FOCUS);
|
||||
nsGenericHTMLFormElement::SetFocus(aPresContext);
|
||||
} else {
|
||||
// If the legend isn't focusable (no tabindex) we focus whatever is
|
||||
// focusable following the legend instead, bug 81481.
|
||||
|
Loading…
Reference in New Issue
Block a user