]> git.gir.st - VimFx.git/commit
Improve focusType detection
authorSimon Lydell <simon.lydell@gmail.com>
Fri, 20 May 2016 15:35:35 +0000 (17:35 +0200)
committerSimon Lydell <simon.lydell@gmail.com>
Fri, 20 May 2016 15:50:53 +0000 (17:50 +0200)
commitfee33fa8e30587d0c68f4c86171dab098dd9db86
tree05298465b28c08fce113cc5aeb11b27756da87e5
parent4967b53ff66cb3cbb6238f7158b476b27dfd8f0d
Improve focusType detection

Inputs focused and blurred inside the Evernote Web Clipper extension's
popup (which is an `<iframe>` injected into the browser UI) were
previously not detected (making it difficult to type into them without
triggering VimFx commands). That was because we have to check if events
really are UI events or not in order to support non-multi-process
Firefox (which expose web page content events to UI code), and
Evernote's elements seem to be indistinguishable from web page content.

This commit simply removes the check for where the event comes from when
looking for focusType changes. Luckily, it doesn't matter if we happen
to handle web page content events in the UI.

To avoid excessive 'focusTypeChange' events (a single focus or blur
might trigger 'focusTypeChange' twice now: Once in the UI code, and once
in the frame script), this commit also makes sure that setting the
focusType to the same value as before is a no-op.

Fixes #733.
extension/lib/events.coffee
extension/lib/vim.coffee
Imprint / Impressum