File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 6464 }
6565 }
6666
67+ function focusZoomedTitle () {
68+ requestAnimationFrame (() => {
69+ const titleEditor = containerElement? .querySelector (' .zoomed_title [contenteditable]' )
70+ if (titleEditor) {
71+ titleEditor .focus ()
72+ const range = document .createRange ()
73+ const sel = window .getSelection ()
74+ range .selectNodeContents (titleEditor)
75+ range .collapse (false )
76+ sel .removeAllRanges ()
77+ sel .addRange (range)
78+ }
79+ })
80+ }
81+
6782 function handleSelectUp (event ) {
6883 const id = event .detail .id
6984 const items = get (itemStore .items )
7287 if (prevItem) {
7388 itemStore .clearSelection ()
7489 focusItem (prevItem .id )
90+ } else if (isZoomedRoot) {
91+ focusZoomedTitle ()
7592 } else {
7693 dispatch (' focusparent' )
7794 }
You can’t perform that action at this time.
0 commit comments