You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,16 @@ livecode:
72
72
zoom: 0.8
73
73
```
74
74
75
+
## 🎯 Keyboard navigation guard
76
+
77
+
Use `disableInitialFocus` to prevent VS Code from stealing keyboard focus when you navigate to a slide — arrow keys keep working for Slidev navigation:
78
+
79
+
```md
80
+
<Editor session="demo" disableInitialFocus />
81
+
```
82
+
83
+
Focus is held on the slide for 5 seconds after VS Code loads, then released normally. The user can interact with VS Code freely after that.
84
+
75
85
## 🔒 Keep the session alive across navigation
76
86
77
87
By default, navigating away from a slide stops the session. Use `persist` to keep it running:
@@ -108,6 +118,7 @@ Per-component props override these values.
108
118
| `defaultFolder` | `string` | project root | Workspace folder to open. Absolute or relative to the Slidev root. |
109
119
| `colorScheme` | `'dark' \| 'light'` | auto | VS Code color theme. Defaults to Slidev's `colorSchema` if set, otherwise none. |
110
120
| `fontSize` | `number` | — | Editor font size. Useful for visibility in large rooms. |
121
+
| `disableInitialFocus` | `boolean` | `false` | Prevent VS Code from stealing keyboard focus on slide entry. |
111
122
| `hideActivityBar` | `boolean` | `false` | Hide the VS Code activity bar (left icon sidebar). |
0 commit comments