| Age | Commit message (Collapse) | Author | 
 | 
The code to handle the focus for UI components has been tweaked and
adapted over time, and has become quite complicated (and brittle).  This
reworks it from scratch, and co-locates similar code which does related
things.
Fixes #2099.
 | 
 | 
 | 
 | 
 | 
 | 
Problems:
  - The meanings of some of the Mode/handlerStack constant names is far
    from obvious.
  - The same thing is named different things in different places.
This changes various constant names such that:
  - the names used in the handler stack and in the modes are the same.
  - ditto vis-a-vis DomUtils.
Also, break out the core of the handler stacks' `bubbleEvent` method
into a switch statements.  This makes it more obvious that the cases are
mutually exclusive.
 | 
 | 
 | 
 | 
We've consumed the event here, so we should suppress it.
 | 
 | 
With the help dialog in an iframe, Escape no longer closes it if that
iframe loses the focus.  This fixes that.
See point 2 of #2045.
This is not a perfect solution: it only works if the focus ends up in
the frame from which the help dialog was launched.  However, that is the
the common case and, in particular, it is the case which arises on the
options page -- which is a particularly important use case.
 | 
 | 
 | 
 | 
`7gj` should be `1j`.
Also, with:
    map ab SOMETHING
`7aab` should be `1ab`.
Replacement for 7774beb6643c0d905f9caba4345453790af948ad.
 | 
 | 
This reverts commit 7774beb6643c0d905f9caba4345453790af948ad.
Reverting this.  It can be done better (and capture some other incorrect
cases).
 | 
 | 
With #2022, we can now implement normal-mode key-handling tests.
Writing these tests uncovered the bug behind 7774beb6643c0d905f9caba4345453790af948ad.
 | 
 | 
E.g. `7gj` should be `1j`; currently it's `7j`.
 | 
 | 
Normal mode updates the pass keys every time the frame changes (so, also
every time we change tab).  Here, we reset the key state too.  Resetting
the key state makes sense when, for example, the user has changed the
pass keys.  However, it also changes a status quo/master behaviour:
- `g`, change-tab-with-mouse, change-back, `g` -- previously this
  scrolled to top; now it does not.
 | 
 | 
This reinstates the legacy behaviour in the following case:
- `g`
- change tab
- change back to the original tab
- `g`
- ..... which scrolls to top.
It is not obvious that this is the best behaviour, but it is the legacy
behaviour, and it certainly isn't unreasonable.
 | 
 | 
- remove unused "event" parameter
- move methods around to put like with like
- simplify some expressions
- one better method name
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
- simplify pass key condition
- don't keep key-parsing Regexp in memory
- we should reset the key state when the pass keys change
 | 
 | 
 | 
 | 
 | 
 | 
Previously, the key-handling logic (keyQueue, etc) was and the backend
whereas passKeys were handled in the content scripts - so they were a
long way apart.
Now that they're in the same place, it makes more sense to integrate
passKey handling into the regular key handling, because they depend upon
the same data structures.
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
... and fix two bugs:
- not suppressing keyup event after keyChar matched in keydown.
- we cannot check the passKeys keyChar in keyup because the key state
  has changed; so we track what the next keyup response should be.
 | 
 | 
 | 
 | 
Miscellaneous fixes and tweaks, including:
- Reinstate key logging.
- Fix count handling in line with expected behaviour in #2024.
- Remove `noCount` option; we don't need it.
- Simplify logic in various places.
Fixes #2024.
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
This implements a generic front-end class for key handling (a la normal
mode).  Also:
- supports count prefixes (or not)
- supports multi-key mappings (longer than two)
Also included is a very poor-man's demo.  See the bottom of
mode_key_handler.coffee for some hard-wired key bindings.
IMPORTANT:
   This does not actually work as Vimium.  It's just a demo.
 |