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

Disable reload context menu in production #271

Merged
merged 1 commit into from
Feb 20, 2022
Merged

Conversation

jkelleyrtp
Copy link
Member

Webview will never get custom context menus (the thing when you right click), so it's up to app authors to implement their own context menus. A library for making that easier will be very helpful to the Dioxus ecosystem.

Anyways, this PR adds an initialization script in release mode that disables the context menu altogether, since having a right click menu that just shows reload is probably not super helpful to most users.

@jkelleyrtp jkelleyrtp changed the title wip: disable reload context menu in production Disable reload context menu in production Feb 20, 2022
@@ -174,7 +174,25 @@ pub fn launch_with_props<P: 'static + Send>(
}

if cfg!(debug_assertions) {
// in debug, we are okay with the reload menu showing and dev tool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will keep menu in debug mode ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to provide the inspect element tool in debug which means we need to keep the menu around. So, yes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh!

@jkelleyrtp jkelleyrtp merged commit 55bb62b into master Feb 20, 2022
@jkelleyrtp jkelleyrtp deleted the jk/desktop-no-reload branch April 27, 2022 05:34
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

Successfully merging this pull request may close these issues.

2 participants