-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
How to disable backspace "go back" navigation? #608
Comments
@rfgamaral It looks like this thread on upstream CEF forums may be relevant:
|
I'd try bool IRequestHandler.OnBeforeBrowse(IWebBrowser browser, IRequest request, bool isRedirect)
{
if (request.TransitionType == TransitionType.ForwardBack)
{
return true;
}
return false;
} |
There's no such thing as EDIT: It seems it was only added at c92a26d. EDIT 2: I compiled CefSharp from source and your idea seems to be working as expected. I just had to change the if statement to If this is an acceptable solution and the And thank you, once again :) |
@rfgamaral Perhaps this is because This will cover all cases where ForwardBack is included in the flag: |
Not sure if my |
@rfgamaral Glad you found a solution, closing now. |
I found an issue with this and I was not sure if I should have opened a new issue so I'm just posting it here. It mostly works but I found a situation where it doesn't. When the browser is first opened within my SlackUI application, you have a form to login and a link to reset your password. If you open that reset link, you'll have a This means it will never be caught by |
That is To find this out, use Google to search |
Also, |
I guess I'll have to use your solution after all :) Thanks. |
@rfgamaral Your welcome to go through |
Here's my attempt at this rfgamaral/SlackUI@6503fd7.
This prevents the browser "go back" navigation but also prevents the user from deleting characters from an input text box, which is not good. I can't seem to detect if the focus is on an input text box or the browser and disable the backspace key press accordingly.
What other options do I have?
The text was updated successfully, but these errors were encountered: