From 08e77779d3c96244fc5e3702f1565180ac32e621 Mon Sep 17 00:00:00 2001 From: Shotaro Nakamura Date: Wed, 24 Apr 2024 13:12:44 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20Play=E3=83=A2=E3=83=BC=E3=83=89=E3=81=A7?= =?UTF-8?q?=E3=83=95=E3=82=A9=E3=83=BC=E3=82=AB=E3=82=B9=E3=81=97=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/islands/note/App.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/islands/note/App.tsx b/src/islands/note/App.tsx index 52e69d58..d2e1cc1e 100644 --- a/src/islands/note/App.tsx +++ b/src/islands/note/App.tsx @@ -2,7 +2,7 @@ import Notes from './components/Notes' import { createTextNote } from './components/notes/TextNote' import Header from './components/Header' import Fab from './components/Fab' -import { Show, createSignal, onMount, onCleanup } from 'solid-js' +import { Show, createSignal, onMount, onCleanup, createEffect } from 'solid-js' import './App.css' import { createImageNote } from './components/notes/ImageNote' @@ -67,6 +67,18 @@ export default (props: Props) => { saveStep() }) const [getLoadError, setLoadError] = createSignal() + + createEffect(() => { + if (!noteBookState.isEditMode) { + for (const note of notes.notes()) { + for (const handler of (note.events?.focus ?? [])) { + handler({ + isActive: false + }) + } + } + } + }) return
setLoadError(void 0)} type="alert" title="Load Error">{ getLoadError() }