fix(collection/presentation): ocassional error when trying to enter fullscreen via key combination

This commit is contained in:
Elian Doran 2025-10-15 21:32:43 +03:00
parent 3495ed82fb
commit 8a85edf2db
No known key found for this signature in database

View File

@ -60,7 +60,15 @@ function Presentation({ presentation } : { presentation: PresentationModel }) {
apiRef.current = new Reveal(containerRef.current, {
transition: "slide",
embedded: true
embedded: true,
keyboardCondition(event) {
// Full-screen requests sometimes fail, we rely on the UI button instead.
if (event.key === "f") {
return false;
}
return true;
},
});
apiRef.current.initialize().then(() => {
console.log("Slide.js initialized.");