1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-18 14:05:45 +01:00

gi focuses the first textbox now as a fallback

This commit is contained in:
Martin Stubenschrott
2008-01-05 13:15:05 +00:00
parent a872775493
commit 2503c94383
2 changed files with 224 additions and 217 deletions

View File

@@ -608,8 +608,14 @@ vimperator.Mappings = function () //{{{
{
if (vimperator.buffer.lastInputField)
vimperator.buffer.lastInputField.focus();
else // TODO: Focus first input field on page, or beep if none found
vimperator.beep();
else
{
var first = vimperator.buffer.element("@type='text'"); // does not work for textareas yet
if (first)
first.focus();
else
vimperator.beep();
}
},
{
shortHelp: "Focus last used input field"