[PR #2837] [MERGED] fix(client): stabilize triggerFilePicker and prevent premature cleanup on Gtk/Firefox #5762

Closed
opened 2026-10-22 04:19:17 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2837
Author: @Minsklatte
Created: 6/23/2026
Status: ✅ Merged
Merged: 6/23/2026
Merged by: @SpicyMarinara

Base: staging ← Head: manual-test-gtk-firefox


📝 Commits (2)

  • 4056ea9 fix(client): remove window focus listener from triggerFilePicker to prevent premature cleanup on Gtk/Firefox
  • b9ae642 Merge branch 'staging' into manual-test-gtk-firefox

📊 Changes

1 file changed (+3 additions, -17 deletions)

View changed files

📝 packages/client/src/components/panels/SettingsPanel.tsx (+3 -17)

📄 Description

Linked issue

N/A - Gtk/Firefox file picker stabilization for PR #2836.

Why this change

  • Fixes premature cleanup of the dynamic programmatic file picker element on Linux/Gtk/Firefox.
  • On some systems/browsers (like Firefox on Linux), opening the native file modal immediately triggers a window focus/blur event sequence.
  • If we clean up on window focus, the element gets removed from the DOM before the user can select a file, causing Firefox to abort the selection and the import to silently fail.

What changed

  • Removes the window focus event listener from triggerFilePicker.
  • Retains the robust class-based pre-cleanup mechanism (.marinara-programmatic-picker) to prevent input element accumulation/leaks on cancel.
  • Retains the immediate post-change event DOM cleanup.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Manually verify extension file imports in Firefox on Linux.
  • Manually verify extension folder imports in Firefox on Linux.
  • Manually verify theme imports in Firefox on Linux.
  • Verify that cancel/dismiss does not leave leaked input elements in the DOM on subsequent clicks.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

  • N/A

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/2837 **Author:** [@Minsklatte](https://github.com/Minsklatte) **Created:** 6/23/2026 **Status:** ✅ Merged **Merged:** 6/23/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `manual-test-gtk-firefox` --- ### 📝 Commits (2) - [`4056ea9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4056ea9d20855d6564267321bde1c282d5b4df7b) fix(client): remove window focus listener from triggerFilePicker to prevent premature cleanup on Gtk/Firefox - [`b9ae642`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b9ae6423b36b834dcf50f805ce693fe90033dec3) Merge branch 'staging' into manual-test-gtk-firefox ### 📊 Changes **1 file changed** (+3 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+3 -17) </details> ### 📄 Description ## Linked issue N/A - Gtk/Firefox file picker stabilization for PR #2836. ## Why this change - Fixes premature cleanup of the dynamic programmatic file picker element on Linux/Gtk/Firefox. - On some systems/browsers (like Firefox on Linux), opening the native file modal immediately triggers a window focus/blur event sequence. - If we clean up on window `focus`, the element gets removed from the DOM *before* the user can select a file, causing Firefox to abort the selection and the import to silently fail. ## What changed - Removes the window `focus` event listener from `triggerFilePicker`. - Retains the robust class-based pre-cleanup mechanism (`.marinara-programmatic-picker`) to prevent input element accumulation/leaks on cancel. - Retains the immediate post-change event DOM cleanup. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Manually verify extension file imports in Firefox on Linux. - Manually verify extension folder imports in Firefox on Linux. - Manually verify theme imports in Firefox on Linux. - Verify that cancel/dismiss does not leave leaked input elements in the DOM on subsequent clicks. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) - N/A --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:19: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#5762
No description provided.