oslego / chrome-backspace-back

Google Chrome extension that restores browser behavior of navigating to previous page when pressing the Backspace key.
76 stars 7 forks source link

Navigates back in DOM manipulated websites like with Polymer although focus is on text field #3

Closed su-ex closed 8 years ago

su-ex commented 8 years ago

To reproduce:

  1. Go here: https://shop.polymer-project.org
  2. Put anything in the cart and hit checkout.
  3. Now put the curser on any text field and hit backspace.
  4. It'll navigate back instead of remove the text.

I didn't find any easy way to fix this with the way how Polymer works since every function in js or jQuery returns the wrong element type where focus is on. Not quite relevant yet but the number of such web apps is growing.

0xE1 commented 8 years ago

I think I found a wayaround, this issue, event have 'path' array, which should have source input element always on 0th index. Checking this should solve this issue.

oslego commented 8 years ago

@0xE1 That's very clever and it works without negatively impacting other websites. Thank you!

Fixed. Will be published very soon with version 1.1 of the extension.