Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
fix(ui): open What's New on the first click
Josh Corbett9543418da58b
diff --git a/invokeai/frontend/webv2/src/workbench/shell/WhatsNewDialog.tsx b/invokeai/frontend/webv2/src/workbench/shell/WhatsNewDialog.tsxindex ce2470bdae..76a731f3ff 100644--- a/invokeai/frontend/webv2/src/workbench/shell/WhatsNewDialog.tsx+++ b/invokeai/frontend/webv2/src/workbench/shell/WhatsNewDialog.tsx@@ -48,6 +48,12 @@ const WhatsNewModalLayer = () => {return null;};+/**+ * The modal traps focus, so focus outside it is never the user leaving. Under StrictMode the first, lazily loaded+ * mount restores focus to the launcher button mid-open, and the stale dismiss layer closed the notes on that.+ */+const keepOpenOnFocusOutside = (event: { preventDefault: () => void }) => event.preventDefault();+export const WhatsNewDialog = () => {const { t } = useTranslation();const { isOpen, isUnseen, version } = useWhatsNew();@@ -80,6 +86,7 @@ export const WhatsNewDialog = () => {placement="center"scrollBehavior="inside"size="lg"+ onFocusOutside={keepOpenOnFocusOutside}onOpenChange={handleOpenChange}>{isOpen ? <WhatsNewModalLayer /> : null}