mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2807] [MERGED] fix(client): use dynamic programmatic file picker to fix Linux/Firefox silent import failures #5743
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5743
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2807
Author: @Minsklatte
Created: 6/22/2026
Status: ✅ Merged
Merged: 6/22/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/linux-firefox-silent-import📝 Commits (2)
6ce4287fix(client): replace hidden file inputs with programmatic picker to resolve Gtk/Firefox silent failuresfc5f0e7fix(client): guard triggerFilePicker from leaking inputs when cancelled📊 Changes
1 file changed (+61 additions, -7 deletions)
View changed files
📝
packages/client/src/components/panels/SettingsPanel.tsx(+61 -7)📄 Description
Why this change is needed
When attempting to import custom CSS themes or JS/JSON extensions on certain browser/OS environments (specifically Firefox on Gtk/Linux desktops), clicking the import button successfully opens the native file picker, but selecting a file and clicking 'Open' silently drops the event with absolutely no console errors or toasts.
Root Cause
display: none/hidden): Certain layout engines (Gecko/Firefox Gtk portals) do not deliver file-picker payloads or firechangeevents on elements with 0x0px visual size or de-activated display trees.<input>nodes inside<label>elements creates mouse-click delegation loops in Gtk/Firefox that abort the change event thread on return.fileRef.currentclick captures to trigger on detached DOM elements, which successfully open native dialogs but cannot bubble events back to React's document root.The Fix
We completely replaced all hidden HTML file-picker nodes with a purely programmatic, dynamic file picker trigger (
triggerFilePicker).<input type="file">dynamically in global scope when clicked.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.