Complete Full Book view: wire Ctrl+A select-all and add e2e coverage

Route the renderer select-all listener (previously sent but never handled) to
the active editor, and extend the e2e scenario to verify the Full Book
assembly, stats, Copy All clipboard content, and read-only select-all.
This commit is contained in:
avi 2026-08-17 18:13:40 -05:00
commit 46eca18cdf
3 changed files with 78 additions and 1 deletions

View file

@ -845,9 +845,20 @@ export function initBook(api: FolioAPI) {
if (editorView.hasFocus) redo(editorView);
else document.execCommand("redo");
});
api.onSelectAllRequested(() => {
if (!fullBookView.classList.contains("hidden")) {
fullBookEditor.focus();
selectAll(fullBookEditor);
} else if (editorView.hasFocus) {
selectAll(editorView);
} else {
document.execCommand("selectAll");
}
});
setChapterButtons(false);
void renderRecents();
(window as any).__folioEditor = editorView;
(window as any).__folioFullBookEditor = fullBookEditor;
}