[GH-ISSUE #2848] [Issue]: Conversation Mode — Prompt Preset "Edit Prompt" window closes on any click and discards the edit #1442

Closed
opened 2026-10-21 05:35:17 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Romuromylus on GitHub (Jun 24, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2848

Originally assigned to: @Romuromylus on GitHub.

Summary

In Conversation Mode, the Chat Settings → Prompt Preset → "Edit Prompt" window closes the moment you click anywhere inside it (including the Collapse button), and any edit you made is discarded. Only keyboard editing is possible, and the change is lost on close.

Expected behavior

Clicking inside the editor keeps it open, and closing it via Collapse or Escape persists the edited conversation prompt.

Actual behavior

The first mouse click inside the editor closes both the editor and the underlying chat settings drawer without committing the edit. Because the only working close paths (Collapse/Escape) are themselves triggered by a click that closes the drawer first, the change never saves.

Steps to reproduce

  1. Open a Conversation Mode chat → Chat Settings → Prompt Preset.
  2. Click Edit Prompt to open the full-screen editor.
  3. Click anywhere inside the editor (the textarea, or the Collapse button).
  4. The editor and the chat settings drawer close; any text you changed is not saved.

Environment

  • Marinara Engine version: 2.0.4
  • Install type: source (GitHub)
  • OS + version: Windows 11
  • Browser or app shell: Chrome

Logs, screenshots, or video

Root cause: the editor (ExpandedTextarea) renders through a portal to document.body, above the chat settings drawer. The drawer's capture-phase pointerdown "close on outside click" handler only treats clicks inside its own panel (or inside a [data-chat-floating-panel] element) as "inside". The portal-rendered editor is neither, so the first click is read as outside, closes the drawer, and unmounts the editor before its on-close commit can run.

Additional context

Also affects the Game extra-prompt and Scene-instructions expanded editors opened from the chat settings drawer, which use the same overlay component.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Romuromylus on GitHub (Jun 24, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2848 Originally assigned to: @Romuromylus on GitHub. ## Summary In Conversation Mode, the **Chat Settings → Prompt Preset → "Edit Prompt"** window closes the moment you click anywhere inside it (including the Collapse button), and any edit you made is discarded. Only keyboard editing is possible, and the change is lost on close. ## Expected behavior Clicking inside the editor keeps it open, and closing it via Collapse or Escape persists the edited conversation prompt. ## Actual behavior The first mouse click inside the editor closes both the editor and the underlying chat settings drawer without committing the edit. Because the only working close paths (Collapse/Escape) are themselves triggered by a click that closes the drawer first, the change never saves. ## Steps to reproduce 1. Open a Conversation Mode chat → Chat Settings → Prompt Preset. 2. Click **Edit Prompt** to open the full-screen editor. 3. Click anywhere inside the editor (the textarea, or the Collapse button). 4. The editor and the chat settings drawer close; any text you changed is not saved. ## Environment - Marinara Engine version: 2.0.4 - Install type: source (GitHub) - OS + version: Windows 11 - Browser or app shell: Chrome ## Logs, screenshots, or video Root cause: the editor (`ExpandedTextarea`) renders through a portal to `document.body`, above the chat settings drawer. The drawer's capture-phase `pointerdown` "close on outside click" handler only treats clicks inside its own panel (or inside a `[data-chat-floating-panel]` element) as "inside". The portal-rendered editor is neither, so the first click is read as outside, closes the drawer, and unmounts the editor before its on-close commit can run. ## Additional context Also affects the Game extra-prompt and Scene-instructions expanded editors opened from the chat settings drawer, which use the same overlay component. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:35:17 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#1442
No description provided.