| Age | Commit message (Collapse) | Author |
|
"/" followed immediately by "i" can hang Vimium.
The problem is that launching find mode is asynchronous (we wait until
the HUD is available). Because normal mode is still active, we can enter
insert mode *before* the find-mode HUD receives the focus.
The result is that we end up in both find mode and insert mode, the HUD
has the focus, but the HUD is in insert mode, so it ignores keyboard
events (including `Escape`).
The only way out is to click the page's body and then type `Escape`.
This commit demonstrates the problem: 7d2b00411eae3293fa4c7b1f61b384c0c495b5a2.
This happens in practice, for example while a busy page is loading.
This commit fixes this by ensuring that find-mode blocks keyboard events
immediately (and synchronously) on launch.
|
|
|
|
While working on the visual-mode code, it became apparent that our
current "singleton" implementation is unnecessarily complicated.
This simplifies it. The keys are now required to be strings.
(Previously, they could be any object; which meant we needed to gove
objects an identity. All of which was complicated.)
|
|
|
|
|
|
(We need to use "this" inside this function.)
|
|
|
|
|
|
The super-class's constructor sets @options, so we can't set it here;
instead, we pass the options along.
|
|
This code belongs together, so we put it together.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Use a has for singletons (as it was previously), but with a distinct
identity generated by Utils.getIdentity.
- Fix counts not be using in a number of places.
|
|
- Minor changes.
- Deactivate modes on inputs from focusInput().
|
|
|
|
|
|
- Mainly comments.
- Rename chooseBadge to updateBadge (for consistency).
- No badge for passkeys; also fix tests.
|
|
|
|
|
|
- refactor PostFindMode (to keep separate functionality separated).
|
|
|
|
|
|
|
|
|
|
|
|
See discussion in #1415.
|
|
|
|
- when the selection is contentEditable
- in PostFindMode
Restricted to printable characters.
|
|
The behaviour in the situations described in #1415 require more thought
and discussion.
|
|
- Set Mode.debug to true to see mode activation/deactivation on the
console.
- Use Mode.log() to see a list of currently-active modes.
- Use handlerStack.debugOn() to enable debugging of the handler stack.
|
|
- Better comments.
- Strip unnecessary handlers for leaving post-find mode.
- Simplify passKeys.
- focusInput now re-bubbles its triggering keydown event.
|
|
- Refactor insert-mode constructor.
- Gneralise focusInput.
|
|
From #1413...
Go here: http://jsfiddle.net/smblott/9u7geasd/
In the result window:
Type /Fish (do not press enter).
Click in one of the text areas.
Press Esc.
Type aaa - you're in insert mode.
Type jk - hmm, where did they go?
Type o - oops, you're also in normal mode.
|
|
- Insert mode trigger and blocker.
- Better comments for PostFindMode.
- Better comments for FocusSelector.
- Make insert mode consistent with master.
|
|
In particular, this refactors the handling of non-vimium key events in
PostFindMode. This implements option 2 from #1415. However, #1415 is
not resolved, and option 3 remains a viable option.
|
|
- Slight rework of HandlerStack.
- Remove classs ExitOnEscape and ExitOnBlur
- Rework InsertMode, plus trigger and blocker.
- Remove StateMode.
- Do no mixin options.
- Lots of tidy up (including set a debug variable to Mode).
|
|
This begins work on addressing @philc's comments in #1413. That work is
nevertheless not yet complete.
|
|
Also fix post insert.
|
|
|