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:
parent
c7323af38f
commit
46eca18cdf
3 changed files with 78 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue