Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Browse for SRT file..." button doesn't work #26

Open
Crypt0zauruS opened this issue Feb 18, 2024 · 2 comments
Open

"Browse for SRT file..." button doesn't work #26

Crypt0zauruS opened this issue Feb 18, 2024 · 2 comments

Comments

@Crypt0zauruS
Copy link

Crypt0zauruS commented Feb 18, 2024

Hi, "Browse for SRT file..." button in Form.tsx doesn't work for me.
I've made it working with a small change:

I've replaced the div

`

  Browse for SRT file…

`

by this code:

`

  <input
                id="fileInput"
                type="file"
                accept=".srt"
                onChange={(e) => setFile(e.target.files![0])}
                className="absolute inset-0 opacity-0 cursor-pointer"
    />

   <button
                type="button"
                className="rounded-sm bg-[#d9d9d9] py-2 px-2"
                onClick={() => {
                  const fileInput = document.getElementById("fileInput");
                  if (fileInput) {
                    fileInput.click();
                  }
                }}
              >
                Browse for SRT file…
     </button>

`
Everything works now
Thank you

@yazinsai
Copy link
Owner

hi @Crypt0zauruS can you please confirm which OS/Browser you're using? Works on Chrome Version 121.0.6167.139 (Official Build) (arm64)

@Crypt0zauruS
Copy link
Author

Crypt0zauruS commented Feb 25, 2024

HI @yazinsai the button doesn't work on my Firefox 123.0 (Official Build) on MacBook Air M1 Sonoma 14.3.1, but as I said, that works with my piece of code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants