In v0.6.5, opening the Teleprompter with an empty script shows the TextEditor and the “Paste the script here” placeholder, but the editor does not accept keyboard input or paste.
Reproduction
- Open Cyclop.
- Open the Teleprompter tab with an empty script.
- Click inside the editor.
- Try typing or pasting text.
The editor is visible but does not receive keyboard focus.
Root cause
TeleprompterPane renders the editor when either:
editing || prompter.script.isEmpty
but keyboard focus is assigned using:
focused = wants && editing
So for the initial empty-script state, the editor is rendered while editing == false, preventing it from becoming focused.
Fix tested locally
Changing the focus condition to:
focused = wants && (editing || prompter.script.isEmpty)
and initializing editing/focus when the pane appears with an empty script:
.onAppear {
prompter.rewind()
if prompter.script.isEmpty {
editing = true
wantsKeyboard = true
focused = true
}
}
fixes the issue locally.
Tested after rebuilding Cyclop from source on v0.6.5. Typing and paste both work normally after the change.
In v0.6.5, opening the Teleprompter with an empty script shows the
TextEditorand the “Paste the script here” placeholder, but the editor does not accept keyboard input or paste.Reproduction
The editor is visible but does not receive keyboard focus.
Root cause
TeleprompterPanerenders the editor when either:but keyboard focus is assigned using:
focused = wants && editingSo for the initial empty-script state, the editor is rendered while
editing == false, preventing it from becoming focused.Fix tested locally
Changing the focus condition to:
and initializing editing/focus when the pane appears with an empty script:
fixes the issue locally.
Tested after rebuilding Cyclop from source on v0.6.5. Typing and paste both work normally after the change.