@@ -309,6 +309,8 @@ export class FocusManager {
309309 * Note that this may update the specified node's element's tabindex to ensure
310310 * that it can be properly read out by screenreaders while focused.
311311 *
312+ * The focused node will not be automatically scrolled into view.
313+ *
312314 * @param focusableNode The node that should receive active focus.
313315 */
314316 focusNode ( focusableNode : IFocusableNode ) : void {
@@ -423,6 +425,8 @@ export class FocusManager {
423425 * the returned lambda is called. Additionally, only 1 ephemeral focus context
424426 * can be active at any given time (attempting to activate more than one
425427 * simultaneously will result in an error being thrown).
428+ *
429+ * This method does not scroll the ephemerally focused node into view.
426430 */
427431 takeEphemeralFocus (
428432 focusableElement : HTMLElement | SVGElement ,
@@ -439,7 +443,7 @@ export class FocusManager {
439443 if ( this . focusedNode ) {
440444 this . passivelyFocusNode ( this . focusedNode , null ) ;
441445 }
442- focusableElement . focus ( ) ;
446+ focusableElement . focus ( { preventScroll : true } ) ;
443447
444448 let hasFinishedEphemeralFocus = false ;
445449 return ( ) => {
@@ -574,7 +578,7 @@ export class FocusManager {
574578 }
575579
576580 this . setNodeToVisualActiveFocus ( node ) ;
577- elem . focus ( ) ;
581+ elem . focus ( { preventScroll : true } ) ;
578582 }
579583
580584 /**
0 commit comments