ttalvitie / browservice

Browservice: Browse the modern web on historical browsers
MIT License
1.13k stars 32 forks source link

Pressing backspace always goes back a page #54

Open jfw1 opened 3 years ago

jfw1 commented 3 years ago

When pressing Backspace, for example, to correct a typo, Browservice will take you back a page, instead of deleting the character.

Steps to reproduce:

  1. Go to gmail.com
  2. Click Sign In
  3. Enter part of your email address
  4. Press Backspace
  5. Notice that the browser goes back a page, instead of backspacing character

Seemingly, if you do a Google search then backspace a character in the search box, it doesn't go back - it behaves as expected and deletes the chosen character.

OS: Windows NT 4.0, Internet Explorer 6. Also tested with Windows XP Pro SP3, IE 6.

ttalvitie commented 3 years ago

I can reproduce this; I think I have actually encountered this issue before, though not often enough to really be sure. To me, it only appears to affect text input fields that were selected by default when opening a page. For example, on the Gmail login page, if I click outside the login text box and then back inside and then press backspace, it will work correctly.

I have to investigate this further to see what is causing this; it could be either Browservice using CEF focus handling incorrectly or an issue with CEF itself.

ttalvitie commented 3 years ago

This seems to be caused by CEF bug https://bitbucket.org/chromiumembedded/cef/issues/3184/cef_key_event_t-focus_on_editable_field-is ; I can't think of any workarounds (other than manually clicking elsewhere), so I think we need to wait for the CEF bug be solved.

Littlemac123 commented 2 years ago

https://stackoverflow.com/questions/1495219/how-can-i-prevent-the-backspace-key-from-navigating-back#2768256

do this