a11y-outline

web extension to navigate document outlines easily
git clone https://git.ce9e.org/a11y-outline.git

commit
e974acb8e40541750bc3fb87ea2287f98de120b1
parent
c0a7213fa4febfe97860b02f39403085d11621a3
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2021-06-03 13:29
replace scrollIntoViewIfNeeded

Diffstat

M src/treeview.js 4 +---

1 files changed, 1 insertions, 3 deletions


diff --git a/src/treeview.js b/src/treeview.js

@@ -23,9 +23,7 @@ var activate = function(item) {
   23    23 		var tree = item.closest('[role="tree"]');
   24    24 		tree.setAttribute('aria-activedescendant', item.id);
   25    25 
   26    -1 		if (item.scrollIntoViewIfNeeded) {
   27    -1 			item.scrollIntoViewIfNeeded();
   28    -1 		}
   -1    26 		item.scrollIntoView({block: 'nearest'});
   29    27 
   30    28 		// selection follows focus
   31    29 		var old = tree.querySelector('[aria-selected="true"]');