Focus input text field on Esc

Focus the first visible input text field when you press Esc key, or restore the previously focused element on second press

These are versions of this script where the code was updated. Show all versions.

  • v1.0.10 - also focus textarea
  • v1.0.9 - bugfix
  • v1.0.8 - pierce shadow dom
  • v1.0.7
  • v1.0.6
  • v1.0.5 - also restore the scroll position
  • v1.0.4 - Add explicit `@include *` as Tampermonkey requires it now
  • v1.0.3 - simplify the code
  • v1.0.2 - don't enumerate further if the first found input has some text
  • v1.0.1 - typo
  • v1.0