This repository has been archived by the owner on Sep 21, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent _scrollNodeIntoView click on Tree node click.
The scrollNodeIntoView function is called from the _focus function, which can be called either when the user navigate via the keyboard, or when a user click a node. When navigating with the keyboard, it makes sense because we might focus a node which isn't visible on the viewport so we need to scroll it into view. When clicking a node, obviously it is already visible (unless we call node element.click , but that's never done in the code). Because it's already visible, no need to check if we should scroll, so we save the computation time.
- Loading branch information