[Vimprobable-users] [Patch] Slightly more intelligent focus handling
Vimprobable is a lean web browser optimised for full keyboard control
Brought to you by:
hanness
From: Hannes S. <ha...@yl...> - 2012-02-28 15:16:31
|
As a followup to the new "escapeinput" setting, here is what I hope to be a little improvement. The logic is basically in the second hunk of the attached patch. Even if "escapeinput" is set, there are a few new checks performed before simply snatching focus away from whereever it is: 1. If Javascript is not active, do nothing (rationale: the problem for which this setting is meant cannot occur). 2. If some website element has been focused manually in the meantime by the user, do nothing. 3. If the input box has been activated, do nothing. The second one could still be a source of problems. For example, if the user manually focused an element while loading the page and *then*, some javascript grabbed focus, the desired effect of "escapeinput" will not occur. That, however, would again only be possible to prevent if we could detect focus stealing events defined on the website, and if we managed to do that, we wouldn't need this logic anyway. Let me know what you think and whether you can think of any cases which aren't covered by the new logic yet (i.e. when the browser does not behave as it should - taking focus away or focusing something when it shouldn't). Hannes |