SEBWIN-463: Ensured clicking a link with keyboard modifiers doesn't activate default browser behavior.
This commit is contained in:
parent
20a2bb9ad9
commit
7feb3a68cf
1 changed files with 15 additions and 0 deletions
|
@ -94,6 +94,21 @@ namespace SafeExamBrowser.Browser.Handlers
|
||||||
return base.OnBeforeBrowse(webBrowser, browser, frame, request, userGesture, isRedirect);
|
return base.OnBeforeBrowse(webBrowser, browser, frame, request, userGesture, isRedirect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override bool OnOpenUrlFromTab(IWebBrowser webBrowser, IBrowser browser, IFrame frame, string targetUrl, WindowOpenDisposition targetDisposition, bool userGesture)
|
||||||
|
{
|
||||||
|
switch (targetDisposition)
|
||||||
|
{
|
||||||
|
case WindowOpenDisposition.NewBackgroundTab:
|
||||||
|
case WindowOpenDisposition.NewForegroundTab:
|
||||||
|
case WindowOpenDisposition.NewPopup:
|
||||||
|
case WindowOpenDisposition.NewWindow:
|
||||||
|
case WindowOpenDisposition.SaveToDisk:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return base.OnOpenUrlFromTab(webBrowser, browser, frame, targetUrl, targetDisposition, userGesture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private bool IsQuitUrl(IRequest request)
|
private bool IsQuitUrl(IRequest request)
|
||||||
{
|
{
|
||||||
var isQuitUrl = false;
|
var isQuitUrl = false;
|
||||||
|
|
Loading…
Reference in a new issue