Web: Files: Dialog body offset on scroll fixed.
This commit is contained in:
parent
5e3158b906
commit
1dd162c5df
@ -239,7 +239,11 @@ class TreeFolders extends React.Component {
|
||||
|
||||
if (selectedNode) {
|
||||
this.needToScroll = false;
|
||||
selectedNode.scrollIntoView();
|
||||
|
||||
selectedNode.scrollIntoView({
|
||||
block: "nearest",
|
||||
inline: "nearest",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,9 +20,15 @@ const FolderTreeBody = ({
|
||||
const { t } = useTranslation(["SelectFolder", "Common"]);
|
||||
|
||||
useEffect(() => {
|
||||
document
|
||||
.getElementsByClassName("rc-tree-node-selected")[0]
|
||||
?.scrollIntoView();
|
||||
const selectedNode = document.getElementsByClassName(
|
||||
"rc-tree-node-selected"
|
||||
)[0];
|
||||
if (selectedNode) {
|
||||
selectedNode.scrollIntoView({
|
||||
block: "nearest",
|
||||
inline: "nearest",
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
@ -235,6 +235,7 @@ const StyledTree = styled.div`
|
||||
|
||||
.files-tree-menu {
|
||||
margin-bottom: 22px;
|
||||
margin-top: 12px !important;
|
||||
}
|
||||
.selection-panel_tree-folder {
|
||||
height: 100%;
|
||||
|
Loading…
Reference in New Issue
Block a user