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

[feat] Disable find in page #7891

Open
Jamzy01 opened this issue Sep 23, 2023 · 6 comments
Open

[feat] Disable find in page #7891

Jamzy01 opened this issue Sep 23, 2023 · 6 comments

Comments

@Jamzy01
Copy link

Jamzy01 commented Sep 23, 2023

Describe the problem

Tauri has come a long way in building apps that almost seem native, but there is one glaring issue. Every time I press F3 or in the less likely case ctrl + f, the find in page feature appears. This immediately ruins the illusion and reminds me that it is just a website. It really is a small thing, but considering that opening the downloads page through ctrl + j is already disabled, I assume this could be a simple fix.

Describe the solution you'd like

In the tauri.conf.json, it would be nice if you could disable inbuilt browser shortcuts individually. This could also help by allowing developers to disable ctrl + r, which personally doesn't bother me, but again just reminds you that it is just a web page.

Alternatives considered

event.preventDefault() on these shortcuts does disable them, but this is in no way a clean and elegant solution.

Additional context

As I explained in alternatives considered, it's not like this isn't already possible, so this feature isn't really in any way urgent. Still if it's a pretty simple feature to implement, then it would be nice to have in a future version of tauri.

@Smit1610
Copy link

Smit1610 commented Oct 4, 2023

I can work on this issue can you please assign to me ?

@Jamzy01
Copy link
Author

Jamzy01 commented Oct 4, 2023

I can work on this issue can you please assign to me ?

Sorry, I don't think I can. I'm pretty sure only admins can assign issues.

@Tnze
Copy link
Contributor

Tnze commented Dec 11, 2023

Also disable Ctrl + R please

@Andrew-web-coder
Copy link

Any solution to this issue?

@Tnze
Copy link
Contributor

Tnze commented Feb 10, 2024

Any solution to this issue?

Eat the keydown event in your javascript.
For example, to disable F5:

document.addEventListener('keydown', event => {
    if (event.key === 'F5') {
        event.preventDefault()
    }
})

@dmca-glasgow
Copy link

Hi there, I have the opposite problem!

I'm looking to turn on the "find in page" functionality but I can't see where to do it.

I'm on MacOS and the latest v1 release of Tauri.

Thanks.

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

No branches or pull requests

5 participants