aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2015-04-18Mode indicator: strip all references to badges.Stephen Blott
2015-03-06Merge branch 'fix-focus-html5-inputs'Stephen Blott
2015-03-06Cosmetic changes (following #1490).Stephen Blott
Mainly fix the indentation on comments. Also tweak wording a bid.
2015-03-03Note relevant PR number for link-hint-text change.Stephen Blott
2015-03-03Do not include duplicated texts in link hints.Stephen Blott
This only effects link hints with "Use the link's name and numbers for link-hint filtering" enabled. We have been matching the *entire text content* of each link-hint element. With two (or more) hints, and with one of the elements a descendent of the other, we have been using the entire text content of the outer node (which includes the text content of the inner node). This leads to odd situations where the inner element cannot be selected just by typing its text, because its text is a substring of the outer element's text. For example, on Google calendar, the "Today" button shows up as two hints, one inside the other. Typing "today" never disambiguates the hint. You always have to hit enter. There's another nasty example on feedly, where an outer container is clickable, but its text contains all of the (many) texts of the (many) contained links. So the hint always has to be selected manually. Here, when generating the text for an element, we exclude the texts from any descendent node which has already been considered.
2015-02-19Only send cursor to end when selection has the cursor at the startmrmr1993
This restores behaviour to how it was at commit 7cedc5d2481f61f4b0d1cbf99fbd203bb5c68b54.
2015-02-19Make DomUtils.isSelected behave correctly for all editable elementsmrmr1993
2015-02-19Stop trying to place the cursor at the end of an input on focusmrmr1993
2015-02-18Remove redundant check, make isSelected's behaviour match its contractmrmr1993
2015-02-17Guard against input elements which don't support selectionStart/Endmrmr1993
These elements throw an error on access, meaning that we can't do an existence check.
2015-02-09Merge branch 'visual-and-edit-modes'Stephen Blott
Conflicts: background_scripts/main.coffee content_scripts/vimium_frontend.coffee lib/keyboard_utils.coffee
2015-02-06Visual/edit modes: code cleanup.Stephen Blott
- convert getCaretCoordinates from JS to CS - handle x axis in scrollIntoView - better comments throughout.
2015-02-03Merge branch 'find-mode-history'Stephen Blott
Conflicts: content_scripts/vimium_frontend.coffee
2015-02-01Merge branch 'modes-rework-dom-tests'Stephen Blott
2015-02-01Give find mode a history.Stephen Blott
2015-01-30Visual/edit modes: another minor code review.Stephen Blott
2015-01-29Visual/edit modes: initial caret mode.Stephen Blott
2015-01-28Visual/edit modes: fix some movements...Stephen Blott
Also, change how vim's "w" is implemented. Also some code-review/cleanup. Better dd and yy for gmail.
2015-01-28Visual/edit modes: yet more minor changes.Stephen Blott
- 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.
2015-01-24Visual/edit modes: more edit-mode commands.Stephen Blott
- "dw", "3dw", "d3w" - "dc", "3dc", "d3c" - "D" - "C" Also refactor enterInsertMode. Also major refactor of interface between edit and visual modes.
2015-01-24Visual/edit modes: miscellaneous improvements.Stephen Blott
2015-01-23Visual/edit modes: more (and better) commands.Stephen Blott
2015-01-23Visual/edit modes: develop edit mode.Stephen Blott
- implement "i", "a". - fix "w" for edit mode. - try out "e" for enter edit mode. - initial implementation "o", "O" - Suppress backspace and delete. - Scroll in text areas.
2015-01-22Visual/edit modes: further development.Stephen Blott
- Better abstraction. - Add HUD message on yank. - Require initial selection for visual mode. - Try to start with a visible selection. - Scroll the active end of the selection into view (with smooth scrolling, if enabled).
2015-01-21Edit mode: first working visual mode.Stephen Blott
2015-01-20Add contentEditable as criterion for isSelectable.Stephen Blott
This allows us to select contentEditable elements in the same way as we can select other inputs. Fixes #1437.
2015-01-20Rework DOM tests (integrate keyboard-event handling).Stephen Blott
This uses phantomjs to generate keyboard events. So the events are propagated through the regular event listeners. So we're testing the full keyboard-event flow.
2015-01-20Rework DOM tests.Stephen Blott
- Set up modes such that they can be re-initialised. - Move initialisation of BadgeMode to general initialisation function. - Add reset() method for handlerStack. - Consistently use initializeModeState() in all tests' setup(). - Refactor focusInput tests. - Add some more tests. - Simplify some other tests. Note: Clean-up of the inputFocus overlay now happens when the exit() method is called in Mode.reset(). This eliminates most needs to artificially bubble a keyboard event to clear the overlay.
2015-01-20Minor refactoring of isSelected().Stephen Blott
There's no point in focusing element if it's already active. Also, we leave the caret in place, not just a range selection. isSelected makes the wrong decision if the user has placed the caret at the start of element. We cannot distinguish that case from the user having made no selection. Nevertheless, this is substantially better than the existing UX, which *always* moves the caret to the end.
2015-01-18Move isSelected test to before possible blur/click.Stephen Blott
2015-01-18Merge branch 'master' into fix-simulate-selectStephen Blott
2015-01-18Do not change selection if selection exists.Stephen Blott
Fixes #1430.
2015-01-18Modes; fix simulateSelect for PostFindMode.Stephen Blott
2015-01-18Merge pull request #1413 from smblott-github/modesStephen Blott
A modal-browsing framework
2015-01-18Modes; pre-merge clean up.Stephen Blott
2015-01-16Modes; clean up.Stephen Blott
2015-01-12Fix race condition on the options page (better).Stephen Blott
Uses document.readyState for all onDOMContentLoaded dependent functions. This should fix the same race condition as #1426 for all cases.
2015-01-12Fix race condition on the options page.Stephen Blott
Fixes #1426.
2015-01-11Modes; yet more tweaks, yet more tests.Stephen Blott
2015-01-11Modes; rework debugging support.Stephen Blott
2015-01-11Modes; add DOM tests.Stephen Blott
2015-01-11Modes; add DOM tests.Stephen Blott
2015-01-10Modes; better printable detection, move to keyboard_utils.Stephen Blott
2015-01-10Modes; reinstate key blockers:Stephen Blott
- when the selection is contentEditable - in PostFindMode Restricted to printable characters.
2015-01-10Modes; instrument for debugging...Stephen Blott
- 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.
2015-01-10Modes; more changes...Stephen Blott
- Better comments. - Strip unnecessary handlers for leaving post-find mode. - Simplify passKeys. - focusInput now re-bubbles its triggering keydown event.
2015-01-08Modes; incorporate small changes from #1413.Stephen Blott
Slightly more significant: Move several utilities to dome_utils.
2015-01-08Modes; more changes...Stephen Blott
- Simplify InsertMode Trigger/Blocker (yet again). - Reduce badge flicker for singletons.
2015-01-08Modes; refactor PostFindMode key handling.Stephen Blott
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.
2015-01-07Modes; Continue incorporation of comments in #1413.Stephen Blott
- 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).