]> git.gir.st - VimFx.git/log
VimFx.git
8 years agoAdd `match.discard()`
Simon Lydell [Wed, 9 Dec 2015 16:54:47 +0000 (17:54 +0100)]
Add `match.discard()`

Solves commit bbdfa761 in a cleaner way.

8 years agoReset typed keys in "autoInsertMode"
Simon Lydell [Wed, 9 Dec 2015 16:45:05 +0000 (17:45 +0100)]
Reset typed keys in "autoInsertMode"

Previously, if you typed for example a 'g' in a text input, click
outside it to unfocus, and then tried to use the `/` command, `g/` would be
triggered instead.

8 years agoDon't notify keys pressed keys in text inputs
Simon Lydell [Wed, 9 Dec 2015 16:39:39 +0000 (17:39 +0100)]
Don't notify keys pressed keys in text inputs

8 years agoMerge pull request #640 from akhodakivskiy/click-browser-element
Simon Lydell [Wed, 9 Dec 2015 17:03:47 +0000 (18:03 +0100)]
Merge pull request #640 from akhodakivskiy/click-browser-element

Add `zF` to click browser elements using hint markers

8 years agoMake it possible to scroll browser elements
Simon Lydell [Tue, 8 Dec 2015 18:36:31 +0000 (19:36 +0100)]
Make it possible to scroll browser elements

The dev tools can contain scrollbars. This commit makes it possible to focus
such scrollable elements with `zF` and then scroll them using all of VimFx's
scrolling commands.

8 years agoAdd command to click browser elements using markers
Simon Lydell [Sun, 6 Dec 2015 16:50:32 +0000 (17:50 +0100)]
Add command to click browser elements using markers

Fixes #236.

A note about the "hamburger menu" in the top-right corner:

It is possible to _open_ it with `zF`, but not possible to use `zF` inside of
it, because of `@popupPassthrough`. One _could_ an exception for that
menu/popup, but that doesn't help:

- `.elementFromPoint()` does not appear to find elements in popups, making it
  difficult to determine if the buttons inside are visible or not.
- The markers appear _behind_ the popup, no matter what `z-index` is used.
- The popup seems to eat `<escape>`: When it is pressed, the popup is closed,
  but the markers remain. The next `<escape>` press removes the markers. Not a
  big deal, but slightly annoying.

Therefore I decided not to add support for that menu in this commit. (Perhaps
we'll be able to do that some time in the future.) Instead, I recommend using
the alt key shortcuts for the "regular" menubar.

8 years agoReplace "VimFx-custom" with "VimFx-config" in docs
Simon Lydell [Tue, 8 Dec 2015 17:54:23 +0000 (18:54 +0100)]
Replace "VimFx-custom" with "VimFx-config" in docs

8 years agoMove the `gr` command to its intended position
Simon Lydell [Mon, 7 Dec 2015 20:43:56 +0000 (21:43 +0100)]
Move the `gr` command to its intended position

8 years agoNotify keys pressed so far of a command
Simon Lydell [Sun, 6 Dec 2015 15:46:24 +0000 (16:46 +0100)]
Notify keys pressed so far of a command

This is only noticeable if typing a multi-key command or using a count.

Fixes #632.

8 years agoRemove outdated locale: pl
Simon Lydell [Sun, 6 Dec 2015 15:01:29 +0000 (16:01 +0100)]
Remove outdated locale: pl

It was less than 50% translated, and many already translated strings needed
updating. Nobody has shown interest in improving it for a long time.

8 years agoRemove outdated locale: hu
Simon Lydell [Sun, 6 Dec 2015 15:01:29 +0000 (16:01 +0100)]
Remove outdated locale: hu

It was less than 50% translated, and many already translated strings needed
updating. Nobody has shown interest in improving it for a long time.

8 years agoRemove outdated locale: el-GR
Simon Lydell [Sun, 6 Dec 2015 15:01:29 +0000 (16:01 +0100)]
Remove outdated locale: el-GR

It was less than 50% translated, and many already translated strings needed
updating. Nobody has shown interest in improving it for a long time.

8 years agoAdd notifications to many commands
Simon Lydell [Sun, 6 Dec 2015 14:53:18 +0000 (15:53 +0100)]
Add notifications to many commands

If nothing happens when activating a command, a notification is shown instead,
making it obvious that you actually triggered the command and didn't press the
wrong keys.

8 years agoLet `<space>` scroll a bit less than a full page
Simon Lydell [Sun, 6 Dec 2015 13:15:25 +0000 (14:15 +0100)]
Let `<space>` scroll a bit less than a full page

Just like Firefox does by default, scroll about a line less than a full page.

`d` and `u` scroll about _half_ a line less (by default), so that pressing `d`
twice works like pressing `<space>` once.

See #555.

8 years agoOrganize scrolling prefs docs a bit more
Simon Lydell [Sun, 6 Dec 2015 13:00:44 +0000 (14:00 +0100)]
Organize scrolling prefs docs a bit more

8 years agoRename `last_scroll_position_mark`
Simon Lydell [Sun, 6 Dec 2015 12:54:48 +0000 (13:54 +0100)]
Rename `last_scroll_position_mark`

... to `scroll.last_position_mark`.

8 years agoAdd a command to enter Reader View
Simon Lydell [Wed, 2 Dec 2015 15:21:58 +0000 (16:21 +0100)]
Add a command to enter Reader View

Fixes #637.

8 years agoAdd a command to open the recently closed tabs list
Simon Lydell [Wed, 2 Dec 2015 15:21:58 +0000 (16:21 +0100)]
Add a command to open the recently closed tabs list

That menu is opened in the middle of the window.

Fixes #636.

8 years agoMerge pull request #639 from comepradz/locale-id
Simon Lydell [Sat, 5 Dec 2015 19:37:53 +0000 (20:37 +0100)]
Merge pull request #639 from comepradz/locale-id

Small improvement for locale/id

8 years agoSmall improvement for locale/id
Yoppy Halilintar [Sat, 5 Dec 2015 19:11:35 +0000 (02:11 +0700)]
Small improvement for locale/id

8 years agoAdd new german translator to PEOPLE.md
Simon Lydell [Sat, 17 Oct 2015 17:39:16 +0000 (19:39 +0200)]
Add new german translator to PEOPLE.md

8 years agoMerge pull request #638 from just-barcodes/master
Simon Lydell [Sat, 5 Dec 2015 18:10:38 +0000 (19:10 +0100)]
Merge pull request #638 from just-barcodes/master

Update de locale

8 years agosmall locale/de improvement
just-barcodes [Sat, 5 Dec 2015 16:32:34 +0000 (16:32 +0000)]
small locale/de improvement

8 years agofix some typos
just-barcodes [Sat, 5 Dec 2015 16:12:31 +0000 (16:12 +0000)]
fix some typos

8 years agoImprove `gi` text selection
Simon Lydell [Fri, 4 Dec 2015 19:37:10 +0000 (20:37 +0100)]
Improve `gi` text selection

Before you have focused a text input (a prevented autofocus does _not_ count),
`gi` now selects all text in the text input it focuses (before, it only did so
for inputs that had autofocus prevented). The reason is that many sites prefill
search boxes with your query on search results pages. Then it’s nice if `gi`
selects all the text, letting you quickly replace it.

This is a continuation of commit b3e8a037.

8 years agoFix scrolling of `<html>` if `<body>` is scrollable
Simon Lydell [Fri, 4 Dec 2015 07:12:02 +0000 (08:12 +0100)]
Fix scrolling of `<html>` if `<body>` is scrollable

`document.activeElement` is never `null`. If no element if focused, it is
`document.body`. If `document.body` is scrollable, it means that `<html>` can
never be scrolled.

This commit only allows to scroll `<body>` if it has been explicitly focused (or
if it is the largest scrollable element, of course).

Fixes #633.

8 years agoFix not being able to focus scrollable elements
Simon Lydell [Thu, 3 Dec 2015 19:27:38 +0000 (20:27 +0100)]
Fix not being able to focus scrollable elements

Regression since commit b3e8a037e.

8 years agoFix `<label>`s getting hints too often
Simon Lydell [Thu, 3 Dec 2015 19:15:37 +0000 (20:15 +0100)]
Fix `<label>`s getting hints too often

Some `<label>`s got hints even though their `<input>` got one as well. This was
due to `getElementShape` getting the wrong rects for the `<input>`.

8 years agoFix AltGr handling on Windows
Simon Lydell [Thu, 3 Dec 2015 13:03:07 +0000 (14:03 +0100)]
Fix AltGr handling on Windows

Fixes #629.

8 years agoMerge pull request #631 from mozillazg/zh-CN
Simon Lydell [Thu, 3 Dec 2015 11:21:52 +0000 (12:21 +0100)]
Merge pull request #631 from mozillazg/zh-CN

update zh-CN locale

8 years agoupdate zh-CN locale
mozillazg [Thu, 3 Dec 2015 11:18:10 +0000 (19:18 +0800)]
update zh-CN locale

8 years agoFix text selection when forusing text inputs
Simon Lydell [Thu, 3 Dec 2015 07:20:43 +0000 (08:20 +0100)]
Fix text selection when forusing text inputs

When using one of the `f` commands to focus a text input, the previous selection
or caret position should be retained, just as if you had clicked it. However,
before this commit all of their text was accidentally selected (as if you had
pressed `<tab>` to foucs).

This also improves the `gi` command. Previously, it _always_ selected all text.
Now it does so only if you use a count, or use `gi` to re-focus an input after a
prevented autofocus. In those cases you likely want to replace what's in the
input, but otherwise you're likely returning to the text input after a temporary
leave and want to continue typing where you left off.

8 years agoVimFx v0.9.0 v0.9.0
Simon Lydell [Wed, 2 Dec 2015 17:37:57 +0000 (18:37 +0100)]
VimFx v0.9.0

8 years agoMerge branch 'master' into develop
Simon Lydell [Wed, 2 Dec 2015 17:31:52 +0000 (18:31 +0100)]
Merge branch 'master' into develop

8 years agoAlways set `wrapper.href` if `wrapper.type == 'link'`
Simon Lydell [Wed, 2 Dec 2015 16:34:25 +0000 (17:34 +0100)]
Always set `wrapper.href` if `wrapper.type == 'link'`

8 years agoImprove text enlargement in the help dialog
Simon Lydell [Wed, 2 Dec 2015 15:27:37 +0000 (16:27 +0100)]
Improve text enlargement in the help dialog

There is never supposed to be a scroll bar. However, there could be sometimes
before. The new check is simpler and better.

8 years agoAdd a command to open the history list
Simon Lydell [Wed, 2 Dec 2015 15:21:58 +0000 (16:21 +0100)]
Add a command to open the history list

The back/forward button context menu is opened in the middle of the window.

Fixes #630.

8 years agoFix some links not being targeted by `F`, `gf` and `gF`
Simon Lydell [Wed, 2 Dec 2015 06:37:53 +0000 (07:37 +0100)]
Fix some links not being targeted by `F`, `gf` and `gF`

In commit af0c4a07, links with an 'onclick' attribute stopped being considered
as "proper". The reason was to prevent such links from getting the same hint as
other links with the same href, because the 'onclick' likely makes all those
links behave differently.

However, on startpage.com the search result links actually are "proper" links,
but also have 'onclick' attributes and since that caused them not to be
considered as proper, they did not get hints when using `F`, `gf` and `gF`
commands.

This commit considers links with 'onclick' as proper again, and only excludes
them from getting the same hint as other links.

8 years agoVimFx v0.8.0 v0.8.0
Simon Lydell [Tue, 1 Dec 2015 17:15:49 +0000 (18:15 +0100)]
VimFx v0.8.0

8 years agoUpdate devDependencies
Simon Lydell [Tue, 1 Dec 2015 17:10:05 +0000 (18:10 +0100)]
Update devDependencies

8 years agoMerge branch 'master' into develop
Simon Lydell [Tue, 1 Dec 2015 16:50:06 +0000 (17:50 +0100)]
Merge branch 'master' into develop

8 years agoUpdate vim-like-key-notation
Simon Lydell [Tue, 1 Dec 2015 16:43:26 +0000 (17:43 +0100)]
Update vim-like-key-notation

It fixes a problem with dead keys on Windows: Otherwise you'd have to customize
for example `g^` to `g<s-dead>^`.

8 years agoDon't consider links with onclick as "proper"
Simon Lydell [Tue, 1 Dec 2015 10:35:51 +0000 (11:35 +0100)]
Don't consider links with onclick as "proper"

They might have the same href, but likely do different things because of the
onclick attribute.

See #596.

8 years agoAdd window commands
Simon Lydell [Mon, 30 Nov 2015 13:57:34 +0000 (14:57 +0100)]
Add window commands

- `w`: Open new window.
- `W`: Open new private window.
- `gw`: Move tab to new window.
- `gF`: Follow link in new window.

Fixes #402.

In #402 two more commands were discussed:

- `q`: Close window. Can easily make more harm than good. Also, why learn a
  Firefox-specific shortcut to close a window, when you can use an OS-wide
  shortcut?
- `Q`: Suggested only for symmetry with `x` and `X`. YAGNI.

8 years agoMerge branch 'master' into develop
Simon Lydell [Mon, 30 Nov 2015 12:50:38 +0000 (13:50 +0100)]
Merge branch 'master' into develop

Conflicts:
documentation/config-file.md

8 years agoRemove `MULTI_PROCESS_ENABLED`
Simon Lydell [Thu, 26 Nov 2015 14:23:33 +0000 (15:23 +0100)]
Remove `MULTI_PROCESS_ENABLED`

It is no longer used anywhere, and was set in an unreliable fashion. Better do
away with it. See #569.

8 years agoAdd commit sha reference to a comment
Simon Lydell [Mon, 30 Nov 2015 12:25:18 +0000 (13:25 +0100)]
Add commit sha reference to a comment

8 years agoRework "move tab to window" detection logic
Simon Lydell [Thu, 26 Nov 2015 09:51:41 +0000 (10:51 +0100)]
Rework "move tab to window" detection logic

The old detection was too unreliable and didn't catch all cases.

Also fixes a bug where the blacklist wasn't applied when going back or forward
in history to a blacklisted URL.

The long story:

If you move a tab into another window in multi-process, the frame script for the
web page of the tab is kept. That is good, since all state (such as scrollable
elements) is preserved.

In non-multi-process, that is not the case. A new frame script is loaded, so all
state is lost. That is unfortunate, but there's nothing we can do about it. In
non-multi-process, moving a tab to another window then works a bit like closing
the tab and opening a new one in the target winow with the same URL: All VimFx
state is lost, including the current mode. The blacklist is applied. However,
the web page content is the same, with DOM modifications and scroll position
preserved. This is not ideal for VimFx, but OK. Non-multi-process will be
dropped from Firefox not too far into the future anyway.

Let's focus on multi-process instead.

That no new frame script is loaded for the "new" (dragged) tab in the target
window has some interesting consequences. For example, `vim` objects for tabs
are created based on a frame script being loaded. Does this mean that no `vim`
object is created for this tab? It depends.

When a new tab is opened, Firefox might load a frame script for `about:blank`.
When the real web page starts loading, a new frame script is loaded.

The above can depend on whether you're moving (dragging) a tab to another
existing window, or moving a tab to an entirely new window (by right-clicking a
tab and choosing “Move to New Window” or dragging a tab and dropping it outside
a tab bar).

If a frame script for `about:blank` _is_ loaded, a `vim` object is created.
However, Firefox then moves over the web page from the old tab, and replaces the
`.messageManager` of the new tab’s `<browser>`! This means that the `vim` object
cannot receive messages from the just-moved-over web page (coming from the frame
script that was kept from the origin window, as mentioned earlier), because it
has attached its listeners to a message manager object that no longer exists.

In both cases it means that VimFx won't work correctly in those tabs. Therefore,
we need to detect tabs moved to other windows.

There does not seem to be any straight-forward way of detecting that, though.
However, we can abuse the fact the `vim` objects for those tabs will either be
missing or have the wrong `._messageManager` as a way of detecting it anyway.
(Since that isn't the case in non-multi-process, that's why we can't detect it
there.)

After having moved a tab to another window, the web page of the tab loads from
cache. This triggers a 'pageshow' event with `event.persisted === true`, just
like when navigating forward and backward in history. When this happens, the
frame scripts send a message to the UI process, which is caught at window level.
If there's no `vim` object for the `<browser>` that the message came from, or if
`vim._messageManager` is out of date, we know that the tab for the `<browser>`
element has just been moved to another window!

In that case, we want to find the `vim` object for the closed tab in the origin
window (the one that we started dragging, for example) and re-use it for the
"new" tab, in order to keep the current mode etc.

That is done be saving the `vim` object of the last closed tab, by listening for
the 'TabClose' event. It fires before the new tab in the target window is
created.

The whole process is very ugly and a bit complicated, but there's seems to be no
other way, and it does the job: Things work acceptably in non-multi-process and
(seemingly) perfectly in multi-process.

8 years agoUpdate config-file.md to link to lydell/VimFx-custom
Simon Lydell [Mon, 30 Nov 2015 09:01:48 +0000 (10:01 +0100)]
Update config-file.md to link to lydell/VimFx-custom

8 years agoMake config-file.md a bit easier to understand
Simon Lydell [Wed, 25 Nov 2015 19:23:14 +0000 (20:23 +0100)]
Make config-file.md a bit easier to understand

See #593 and #607.

8 years agoFix minor code style error in gulpfile.coffee
Simon Lydell [Wed, 25 Nov 2015 17:37:38 +0000 (18:37 +0100)]
Fix minor code style error in gulpfile.coffee

8 years agoAdd Find links only command: `g/`
Simon Lydell [Wed, 25 Nov 2015 15:29:52 +0000 (16:29 +0100)]
Add Find links only command: `g/`

See #434.

8 years agoMerge pull request #626 from akhodakivskiy/marks
Simon Lydell [Wed, 25 Nov 2015 08:12:56 +0000 (09:12 +0100)]
Merge pull request #626 from akhodakivskiy/marks

Implement marks

8 years agoAdd a special mark for returning to the last position
Simon Lydell [Tue, 24 Nov 2015 17:59:47 +0000 (18:59 +0100)]
Add a special mark for returning to the last position

Inspired by Vim and Vimium.

8 years agoImplement simple marks
Simon Lydell [Tue, 24 Nov 2015 17:37:40 +0000 (18:37 +0100)]
Implement simple marks

Inspired by Vim and Vimium, but simpler. All they do is to save the current
toplevel scroll position for the current page, letting you return to that point
later. Global marks are intentionally left out: See #626.

8 years agoMerge branch 'master' into develop
Simon Lydell [Wed, 25 Nov 2015 07:51:38 +0000 (08:51 +0100)]
Merge branch 'master' into develop

8 years agoAdd ability to print untranslated lines in a locale
Simon Lydell [Mon, 23 Nov 2015 20:31:56 +0000 (21:31 +0100)]
Add ability to print untranslated lines in a locale

... via for instance `gulp sync-locales --sv-SE?`.

See #513 and #543.

8 years agoUse `.trimLeft()` instead of `.trim()` in help search
Simon Lydell [Mon, 23 Nov 2015 17:27:53 +0000 (18:27 +0100)]
Use `.trimLeft()` instead of `.trim()` in help search

It feels more natural when searching for more than one word. Otherwise you could
feel a "bump" every time you hit `<space>`.

8 years agoUse normal cursor in help dialog
Simon Lydell [Mon, 23 Nov 2015 06:50:15 +0000 (07:50 +0100)]
Use normal cursor in help dialog

The default I-beam cursor on the text makes it look like you can select and copy
text, which you (unfortunately) can't.

8 years agoSync locales
Simon Lydell [Mon, 23 Nov 2015 06:52:36 +0000 (07:52 +0100)]
Sync locales

8 years agoAdd a search field to the help dialog
Simon Lydell [Sun, 22 Nov 2015 19:52:47 +0000 (20:52 +0100)]
Add a search field to the help dialog

See #619.

8 years agoDescribe `H`, `L`, `[` and `]` briefly in Q&A docs
Simon Lydell [Sun, 22 Nov 2015 17:15:20 +0000 (18:15 +0100)]
Describe `H`, `L`, `[` and `]` briefly in Q&A docs

8 years agoAdd info about Ignore keyboard layout in Q&A docs
Simon Lydell [Sun, 22 Nov 2015 17:14:49 +0000 (18:14 +0100)]
Add info about Ignore keyboard layout in Q&A docs

8 years agoAdd newbie info about Ignore mode and blacklist etc
Simon Lydell [Sun, 22 Nov 2015 17:12:42 +0000 (18:12 +0100)]
Add newbie info about Ignore mode and blacklist etc

See #619.

8 years agoRe-organize the documentation table of contents
Simon Lydell [Sun, 22 Nov 2015 17:10:52 +0000 (18:10 +0100)]
Re-organize the documentation table of contents

Mostly to make it easier for new users. See #619.

8 years agoFix broken updating of the button
Simon Lydell [Sun, 22 Nov 2015 16:28:51 +0000 (17:28 +0100)]
Fix broken updating of the button

When moving from `@vimfx.emit.bind(@vimfx, 'TabSelect', event)` some time, that
code was mistakenly changed to `@vimfx.emit(@vimfx, 'TabSelect', event)` instead
of `@vimfx.emit('TabSelect', event)`

8 years agoMerge branch 'master' into develop
Simon Lydell [Sun, 22 Nov 2015 12:27:23 +0000 (13:27 +0100)]
Merge branch 'master' into develop

Conflicts:
  documentation/config-file.md

8 years agoVimFx v0.7.3 v0.7.3
Simon Lydell [Sun, 22 Nov 2015 12:18:42 +0000 (13:18 +0100)]
VimFx v0.7.3

8 years agoMention "Share your config file" wiki page in the docs
Simon Lydell [Sun, 22 Nov 2015 12:08:28 +0000 (13:08 +0100)]
Mention "Share your config file" wiki page in the docs

8 years agoFix hints mode not exiting when focusing text input
Simon Lydell [Sun, 22 Nov 2015 11:26:14 +0000 (12:26 +0100)]
Fix hints mode not exiting when focusing text input

`marker.type` (which is `undefined`) was used instead of `marker.wrapper.type`
when checking if it is `'text'`. This caused for example `af` not to exit hints
mode when typing the hint for a text input.

8 years agoImprove largest scrollable element detection
Simon Lydell [Sun, 22 Nov 2015 10:03:59 +0000 (11:03 +0100)]
Improve largest scrollable element detection

In commit f405054c a special case was added for the root element:

> Consider the entire page as largest if scrollable
>
> Its area may technically be less than other elements, but if it is scrollable
> that's what you expect to scroll.

However, if you embed such a page in a frame, the page won’t be scrollable
(because it is not the uppermost root element).

This made me realize that it makes the most sense to consider the _uppermost
scrollable element_ the largest. In other words, if a scrollable element
contains another scrollable element (or a frame containing one), the parent
should be considered largest even if the child has greater area.

8 years agoFix being unable to scroll in quirks mode
Simon Lydell [Sun, 22 Nov 2015 08:57:31 +0000 (09:57 +0100)]
Fix being unable to scroll in quirks mode

Alternatively:

Handle quirks mode in a better and more abstracted way.

In quirks mode, `<html>` might receive an 'overflow' event, but it is `<body>`
that is scrollable (and it does _not_ receive an 'overflow' event!) The
`ScrollableElements` class now automatically takes care of this case, storing
`<body>` instead if you try to store `<html>` in quirks mode. This way, only
actually scrollable elements are stored, which makes comparisons such as
`isScrollable` work without having to think about quirks mode. Previously, the
`isScrollable` check in the 'overflow' event handler failed on `<html>` in
quirks mode, making it impossible to scroll on quirky sites, such as Hackernews.

Fixes #621.

8 years agoAllow to customize which elements do and don't get hints
Simon Lydell [Sat, 21 Nov 2015 23:13:02 +0000 (00:13 +0100)]
Allow to customize which elements do and don't get hints

Fixes #565.

8 years agoUpdate release instructions in tools.md
Simon Lydell [Sat, 21 Nov 2015 14:58:47 +0000 (15:58 +0100)]
Update release instructions in tools.md

8 years agoRemove wrong content type for chrome.manifest in config-file.md
Simon Lydell [Sat, 21 Nov 2015 14:09:04 +0000 (15:09 +0100)]
Remove wrong content type for chrome.manifest in config-file.md

8 years agoAdd missing space in style.css
Simon Lydell [Sat, 21 Nov 2015 13:40:38 +0000 (14:40 +0100)]
Add missing space in style.css

8 years agoVimFx v0.7.2 v0.7.2
Simon Lydell [Sat, 21 Nov 2015 13:03:00 +0000 (14:03 +0100)]
VimFx v0.7.2

8 years agoFix text input focus problems since commit a197a16
Simon Lydell [Sat, 21 Nov 2015 12:57:04 +0000 (13:57 +0100)]
Fix text input focus problems since commit a197a16

Since that commit, and only in non-multi-process, when focusing a text input for
a second time it got styled as focused, but no blinking text caret appeared. You
could still type into the text input, though.

8 years agoVimFx v0.7.1 v0.7.1
Simon Lydell [Sat, 21 Nov 2015 10:59:39 +0000 (11:59 +0100)]
VimFx v0.7.1

8 years agoFix typo in tools.md
Simon Lydell [Sat, 21 Nov 2015 10:57:59 +0000 (11:57 +0100)]
Fix typo in tools.md

8 years agoImprove state resetting when a frame changes
Simon Lydell [Sat, 21 Nov 2015 10:54:37 +0000 (11:54 +0100)]
Improve state resetting when a frame changes

8 years agoImprove scrollable element detection when zoomed
Simon Lydell [Sat, 21 Nov 2015 10:22:26 +0000 (11:22 +0100)]
Improve scrollable element detection when zoomed

Elements may overflow when zooming in or out. However, the `.scrollHeight` of
the element is not correctly updated when the 'overflow' event occurs, making it
possible for unscrollable elements to slip in. An example is Google Groups.
There, the entire page gets an 'overflow' event when zooming, and by then it
actually looks to be scrollable. When inspecting the element afterwards, though,
it becomes clear that it is not. Well, actually, then it looks like the element
is scrollable by 1px. So this commit also sets a minimum scroll to 5px.

The solution to the zoom problem is to check if the largest scrollable element
really is scrollable before trying to scroll it. If not, update it.

See #605.

8 years agoVimFx v0.7.0 v0.7.0
Simon Lydell [Thu, 19 Nov 2015 17:45:57 +0000 (18:45 +0100)]
VimFx v0.7.0

8 years agoMerge branch 'master' into develop
Simon Lydell [Wed, 18 Nov 2015 20:34:56 +0000 (21:34 +0100)]
Merge branch 'master' into develop

8 years agoFix scrolling issues on Gmail
Simon Lydell [Wed, 18 Nov 2015 19:45:54 +0000 (20:45 +0100)]
Fix scrolling issues on Gmail

8 years agoSimplify scrollable element rejection
Simon Lydell [Wed, 18 Nov 2015 18:11:02 +0000 (19:11 +0100)]
Simplify scrollable element rejection

One 'pagehide' event is fired for every removed frame, starting with the most
deeply nested one, so there's no need to do a deep containment check for
scrollable elements.

8 years agoMerge branch 'master' into develop
Simon Lydell [Wed, 18 Nov 2015 14:49:01 +0000 (15:49 +0100)]
Merge branch 'master' into develop

Conflicts:
extension/lib/utils.coffee

8 years agoMerge pull request #616 from akhodakivskiy/button-show-focus-type
Simon Lydell [Wed, 18 Nov 2015 14:44:50 +0000 (15:44 +0100)]
Merge pull request #616 from akhodakivskiy/button-show-focus-type

Make the button grey in "Insert mode"

8 years agoMake the button grey in "Insert mode"
Simon Lydell [Mon, 16 Nov 2015 22:38:43 +0000 (23:38 +0100)]
Make the button grey in "Insert mode"

See #608.

8 years agoConsider the entire page as largest if scrollable
Simon Lydell [Wed, 18 Nov 2015 14:12:14 +0000 (15:12 +0100)]
Consider the entire page as largest if scrollable

Its area may technically be less than other elements, but if it is scrollable
that's what you expect to scroll.

8 years agoEnhance `overflow` check for scrollable elements
Simon Lydell [Wed, 18 Nov 2015 13:54:20 +0000 (14:54 +0100)]
Enhance `overflow` check for scrollable elements

Checking the computed style for `overflow` proved to be a bit reliable.
Explicitly checking both `overflow-x` and `overflow-y` works better. If both are
set to `hidden` the element is not scrollable.

8 years agoFix state being lost on some pages
Simon Lydell [Tue, 17 Nov 2015 08:36:53 +0000 (09:36 +0100)]
Fix state being lost on some pages

... especially the largest scrollable element, usually `<html>`.

Since commit 87ece2ac we use the 'readystatechange' to detect location change in
a tab. While that seems to work fine, resetting state at that point does not.
Apparently, at least on some sites, a 'readystatechange' with `readyState ==
'interative'` is fired _after_ `<html>` has been detected as a scrollable
element, causing that scrollable element to be lost (because of a state reset).
If another scrollable element is detected after that, scrolling the entire page
becomes impossible.

Luckily, the 'pagehide' event seems to be exactly what we're looking for, when
it comes to resetting state. It also has the bonus of firing in frames, removing
the need for the `MutationObserver`s for frames added in commit ef5e2366.

<https://developer.mozilla.org/en-US/Firefox/Releases/1.5/Using_Firefox_1.5_caching#pagehide_event>

8 years agoFix broken notifications
Simon Lydell [Mon, 16 Nov 2015 20:54:21 +0000 (21:54 +0100)]
Fix broken notifications

I got it wrong in commit 340584c8 and believed that only one `<statuspanel>` was
needed per window, but one is actually needed for every _tab._ Luckily, the code
became a lot simpler.

8 years agoMerge pull request #603 from lydell/rework-gi-tab
Simon Lydell [Mon, 16 Nov 2015 19:17:53 +0000 (20:17 +0100)]
Merge pull request #603 from lydell/rework-gi-tab

Rework `gi` handling of `<tab>`

8 years agoMerge pull request #615 from akhodakivskiy/rework-notifications
Simon Lydell [Mon, 16 Nov 2015 19:16:42 +0000 (20:16 +0100)]
Merge pull request #615 from akhodakivskiy/rework-notifications

Rework how notifications are shown

8 years agoRework how notifications are shown
Simon Lydell [Wed, 11 Nov 2015 17:03:40 +0000 (18:03 +0100)]
Rework how notifications are shown

Users found `new Notification(message)` too intrusive. This commit shows
notifications in a `<statuspanel>` instead, like the "URL popup" (shown when
hovering or focusing links), but on the opposite side.

When pressing `n` or `N` and the search matches a link, the URL popup is shown.
Putting the VimFx notification on the opposite side allows both to be visible at
the same time.

Notifications are shown until you click them, press a key or switch tab.

See #576.

8 years agoProperly exit "`gi` mode"
Simon Lydell [Thu, 12 Nov 2015 18:55:08 +0000 (19:55 +0100)]
Properly exit "`gi` mode"

Before, if you pressed `gi`, blurred the text input and then focused a text
input (without using Hints mode, such as using `<tab>` or clicking), you would
still be in "`gi` mode", making `<tab>` only cycle between text inputs.

8 years agoRework `gi` handling of `<tab>`
Simon Lydell [Thu, 12 Nov 2015 08:31:08 +0000 (09:31 +0100)]
Rework `gi` handling of `<tab>`

The "Focus previous/next element" commands turned out to be too intrusive. This
commit removes them, and instead handles `<tab>` and `<s-tab>` especially. Those
keys are handled:

- _only_ in web page content.
- _only_ if in "`gi` mode".
- always "late", taking `event.defaultPrevented` into account.
- not if `<tab>` or `<s-tab>` was part of a command shortcut.

This commit removes some (theoretical) flexibility in order to stay true to our
goal not to interfere with the browser.

See #571, #572 and #599.

8 years agoUse `vim.state` instead of `storage` in frame commands
Simon Lydell [Thu, 12 Nov 2015 07:56:17 +0000 (08:56 +0100)]
Use `vim.state` instead of `storage` in frame commands

- The things that were stored in `storage` should be reset when browsing to a
  new page.
- Makes things simpler.

8 years agoFix not being able to type in `<select>`s
Simon Lydell [Mon, 16 Nov 2015 17:21:29 +0000 (18:21 +0100)]
Fix not being able to type in `<select>`s

Typing in a `<select>` should select the matching `<option>`. Regression since
commit 7b187a90.

Imprint / Impressum