webview: disable context menu

This commit is contained in:
Jeena 2026-03-21 02:49:05 +00:00
parent 9bed643023
commit d6858b62a7

View file

@ -314,6 +314,10 @@ pub mod imp {
});
let _ = wv_weak2; // suppress unused warning
// Disable the default WebKit context menu (right-click) — the
// reload/inspect items don't make sense in an embedded reader.
wv.connect_context_menu(|_, _, _| true);
// Handle navigation policy
let win_weak = self.obj().downgrade();
wv.connect_decide_policy(move |_, decision, decision_type| {