Welcome Guest Search | Active Topics | Sign In | Register

How to disable Backspace navigation to previous page Options
yvesm
Posted: Wednesday, May 8, 2019 11:14:01 PM
Rank: Advanced Member
Groups: Member

Joined: 12/1/2014
Posts: 57
Since 2019 pressing the backspace key seems to trigger a navigation to the previous page. Is there a way to disable this? Thank you
eo_support
Posted: Friday, May 10, 2019 3:15:00 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
We are not aware of this problem. Can you reproduce this with our TabbedBrowser sample application?
yvesm
Posted: Friday, May 10, 2019 4:30:12 PM
Rank: Advanced Member
Groups: Member

Joined: 12/1/2014
Posts: 57
No the problem does not exist in TabbedBrowser - could it be because I use CommandBindings. In my application I have a number of buttons - each button can be configured to do a number of different things, including browse back.

I have the following class (just showing some of the code)

public class ChromeWebBrowser : ContentControl, IDisposable

public ChromeWebBrowser()
{
webControl = new EO.Wpf.WebControl();
Content = webControl;

CommandBindings.Add(new CommandBinding(NavigationCommands.BrowseBack, BrowseBackExecuted, CanBrowseBack));
}


private void BrowseBackExecuted(object sender, ExecutedRoutedEventArgs e)
{
if (webView != null)
webView.GoBack();
}

private void CanBrowseBack(object sender, CanExecuteRoutedEventArgs e)
{
if (webView != null)
e.CanExecute = webView.CanGoBack;
}


Then if a button is configured to browse back

metroButton.CommandTarget = currentWebBrowser;
metroButton.Command = NavigationCommands.BrowseBack;



yvesm
Posted: Friday, May 10, 2019 4:42:38 PM
Rank: Advanced Member
Groups: Member

Joined: 12/1/2014
Posts: 57
Need to do more testing but I think I found a solution - adding

NavigationCommands.BrowseBack.InputGestures.Clear();



You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.