From 8889f11244ac67ec6ac56d1d75c8a74f5e5a62d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Fri, 5 Nov 2021 18:23:26 +0100 Subject: [PATCH] Don't scroll when focusing cell output --- assets/js/session/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/session/index.js b/assets/js/session/index.js index 74c7f4172..8e7003267 100644 --- a/assets/js/session/index.js +++ b/assets/js/session/index.js @@ -730,7 +730,7 @@ function setFocusedCell(hook, cellId, scroll = true) { ); // Focus the primary cell content, this is important for screen readers const cellBody = cell.querySelector(`[data-element="cell-body"]`); - cellBody.focus(); + cellBody.focus({ preventScroll: true }); } else { hook.state.focusedCellType = null; hook.state.focusedSectionId = null;