mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 14:26:34 +00:00
fix: disable file:// browsing
This commit is contained in:
parent
69035176d5
commit
3e1a1c9ca9
@ -545,10 +545,12 @@ Rectangle {
|
||||
} else if (request.destination === WebEngineView.NewViewInBackgroundTab) {
|
||||
var backgroundTab = tabs.createEmptyTab(currentWebView.profile);
|
||||
request.openIn(backgroundTab.item);
|
||||
} else if (request.destination === WebEngineView.NewViewInDialog) {
|
||||
// Disablign popups temporarily since we need to set that webengineview settings / channel and other proeprties
|
||||
/*} else if (request.destination === WebEngineView.NewViewInDialog) {
|
||||
var dialog = browserDialogComponent.createObject();
|
||||
dialog.currentWebView.profile = currentWebView.profile;
|
||||
request.openIn(dialog.currentWebView);
|
||||
dialog.currentWebView.webChannel = channel;
|
||||
request.openIn(dialog.currentWebView);*/
|
||||
} else {
|
||||
// Instead of opening a new window, we open a new tab
|
||||
// TODO: remove "open in new window" from context menu
|
||||
@ -611,6 +613,13 @@ Rectangle {
|
||||
findBar.reset();
|
||||
}
|
||||
|
||||
onNavigationRequested: {
|
||||
if(request.url.toString().startsWith("file://")){
|
||||
console.log("Local file browsing is disabled" )
|
||||
request.action = WebEngineNavigationRequest.IgnoreRequest;
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
active: webEngineView.url.toString() === "status://downloads"
|
||||
width: parent.width
|
||||
|
Loading…
x
Reference in New Issue
Block a user