mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix: focus on item when opening page
Moving these code up and down then it works again, weird...
This commit is contained in:
parent
9be44e4e73
commit
ad73e142f4
1 changed files with 2 additions and 1 deletions
|
|
@ -29,6 +29,8 @@ const init = dispatch => () => dispatch(async (state, { treeData, metaData, comp
|
|||
const { root } = treeParser.parse(treeData, metaData)
|
||||
visibleNodesGenerator.setCompress(compressSingletonFolder)
|
||||
await visibleNodesGenerator.plantTree(root)
|
||||
|
||||
tasksAfterRender.push(DOMHelper.focusSearchInput)
|
||||
dispatch(setStateText, null)
|
||||
const currentPath = URLHelper.getCurrentPath(true)
|
||||
if (currentPath.length) {
|
||||
|
|
@ -39,7 +41,6 @@ const init = dispatch => () => dispatch(async (state, { treeData, metaData, comp
|
|||
tasksAfterRender.push(() => DOMHelper.scrollToNodeElement(nodes.indexOf(nodeExpandedTo)))
|
||||
}
|
||||
}
|
||||
tasksAfterRender.push(DOMHelper.focusSearchInput)
|
||||
dispatch(updateVisibleNodes)
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue