Simon Lydell [Tue, 10 Jan 2017 06:53:00 +0000 (07:53 +0100)]
Scroll closest scrollable parent
If you click a tweet on Twitter, a modal with the tweet as well as
responses to it pop up. That modal can be scrollable if there are enough
responses. The container for the main tweet is focused. It feels very
natural that the _modal_ should scroll when using VimFx commands, not
the page behind it. That used not to be the case, but now is. This was
implemented by not just checking if the active element _itself_ is
scrollable, but also whether one of its _parents_ are scrollable, and
using the closest scrollable parent (if any).
Interleaved [Fri, 16 Dec 2016 09:14:43 +0000 (10:14 +0100)]
Update de locale (#845)
* Update de translation for blacklist settings
Use word "Ausnahmen" ("Exception") for the blacklist description instead of using "Schwarze Liste". It could be considered to use "Exeptions" also for the english locale.
* Update de translation for auto activation
* Add more de translations
Tabs is also used mostly in german. Sometimes the word "Registerkarten" is used for that.
Simon Lydell [Sun, 4 Dec 2016 14:48:04 +0000 (15:48 +0100)]
Fix tests in Firefox Nightly
Firefox have either moved the Assert.jsm module, or stopped exposing it.
I'm tired of that happening (it's not the first time), so I decided to
implement the small part of Assert.jsm that was actually used in VimFx's
test on my own. On the upside, this resulted in nicer error messages
when tests fail.
Simon Lydell [Sun, 13 Nov 2016 16:47:19 +0000 (17:47 +0100)]
Always place markers next to text if appropriate
For example, the hint marker for buttons with centered text are now
placed just to the left of the text rather than at the left edge of
button. This is nice because it means that hint markers usually end up
where you were just reading.
Simon Lydell [Wed, 9 Nov 2016 07:07:17 +0000 (08:07 +0100)]
Blur the location bar consistently
Refs. #831: Let's say you added the custom command that focuses the
location bar, sets its text to '% ' and opens the autocomplete popup.
You set the shortcut to `q`. If you then press `q<escape>`, you'll end
up with '% ' being left in the location bar. Usually, the location bar
is cleared when blurring it. This is because of that the autocomplete
popup is open. This commit makes sure to close the location bar
autocomplete popup before blurring, fixing the problem.
Simon Lydell [Tue, 8 Nov 2016 18:43:32 +0000 (19:43 +0100)]
Find `<label>` elements in the first pass for `f`
It is common to implement custom styled checkboxes and radiobuttons by
hiding the actual `<input>` element and style its `<label>` instead.
Therefore it makes sense to find them in the first pass, so you don't
have to wait for their labels so long. This does not seem to degrade the
performance of the first pass.
Simon Lydell [Sun, 6 Nov 2016 20:56:32 +0000 (21:56 +0100)]
Don't reset highlighted hint markers in the second pass
When injecting hint markers for the second pass, do reset which hint
markers are visually highlighted (in case they change), but _don't_
reset the actual data. Regression since commit e70ab849.
Simon Lydell [Sun, 6 Nov 2016 10:27:45 +0000 (11:27 +0100)]
Improve markable element area comparisons
Boxes that appear to be exactly the same size should be given "equally"
good hints, favoring earlier ones when needed. Sometimes, though, their
areas differ from a fraction of a pixel up to a couple of pixels.
This commits changes how the comparisons of marker weights (which
effectively are element areas), so that elements whose area differ by
less than 10px are considered to have the same area. That results in the
expected hints for same-sized boxes.
Refs. #831: The browser tabs often had this problem. At first, all tabs
could be given the expected hints: The first one getting the best one
etc. Opening a new tab, the best hint could suddenly be given to some
random tab in the middle.
Simon Lydell [Sun, 6 Nov 2016 09:33:51 +0000 (10:33 +0100)]
Improve hint marker positioning
A pixel up, down, left or right _is_ visible. Using `Math.round` goes to
the most expected pixel. Previously, markers many times appeared to be
slightly too close to the top of elements, rather than at the center.
Simon Lydell [Tue, 18 Oct 2016 15:09:57 +0000 (17:09 +0200)]
Improve full page scrolling adjustment on some pages
On medium.com, there is a fixed footer. However, it is not
`position: fixed;` like fixed element usually are. Instead, it's
`position: absolute;` (and the page scroll is inside an adjacent element
instead of on `<html>`). This commit allows elements with
`position: absolute;` to as headers and footers as well.
Simon Lydell [Tue, 18 Oct 2016 10:52:08 +0000 (12:52 +0200)]
Fix `<escape>` handling in Normal mode
When pressing `<escape>` inside a text input, `<escape>` is not supposed
to be passed on to the page (like is otherwise done), to allow blurring
text inputs inside modals without also closing the modal. There already
was logic for this, but it didn't work because the check for the
currently selected element and the running of the `<escape>` command was
run in the wrong order.
Simon Lydell [Sun, 9 Oct 2016 10:25:42 +0000 (12:25 +0200)]
Fix text input refocus issue in GNOME
Previously, using a keyboard shortcut to switch keyboard layout in GNOME
while inside a text input caused the focus of that text input to be lost
when the prevent autofocus option was enabled.
Simon Lydell [Sun, 2 Oct 2016 07:48:55 +0000 (09:48 +0200)]
Fix the `'` mark after using `''`
The `'` mark is supposed to point to the location before the last
"jump." One such jump is using the `'` mark itself (by pressing `''`).
This means that running `''` several times in a row will flip back and
forth between two locations. However, that was previously broken. `''`
took you back to the last location, but then you got stuck there. This
commit fixes that bug.
Simon Lydell [Sun, 2 Oct 2016 07:17:06 +0000 (09:17 +0200)]
Fix z-index for hint markers
The hint markers are sorted by element area before assigning their
`z-index`es. This is so that the hint markers of larger elements appear
on top of hint markers for smaller elements. However,
`marker.wrapper.area` (which is `undefined`) was accidentally used
instead of `marker.wrapper.shape.area`. This caused the sorting to
essentially do nothing (since Firefox's `.sort` is stable).