]> git.gir.st - VimFx.git/commit
Don't lose state when loading tabs in the background
authorSimon Lydell <simon.lydell@gmail.com>
Sat, 14 Nov 2015 14:20:40 +0000 (15:20 +0100)
committerSimon Lydell <simon.lydell@gmail.com>
Sat, 14 Nov 2015 15:12:52 +0000 (16:12 +0100)
commit87ece2ac7817a6efbb542d9d1d82a9e570c8395d
tree8a71670353b1fdf2f19d932919e25c5db8f58592
parent638717f797f0605ab64c9b7030c2b69602702d93
Don't lose state when loading tabs in the background

'locationChange' used to be detected in a rather complicated fashion. While this
worked mostly it had problems with tabs loading in the background.
'locationChange' wouldn't fire until the a background tab was _selected,_
causing any state, such as scrollable elements, collected up to that point to be
lost. It also meant that the blacklist patterns were applied to late, which
could cause unwanted autofocus prevention, for example.

Using the 'readystatechange' inside frame scripts seems to do exactly what we
want. This commit switches to that technique, which also simplifies the code a
lot, removing many slightly hacky parts.

See #605.
documentation/api.md
extension/lib/events-frame.coffee
extension/lib/events.coffee
extension/lib/vim.coffee
Imprint / Impressum