1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 12:42:26 +01:00

Completion cleanup. Use elem.contentDocument in followLink.

This commit is contained in:
Kris Maglione
2008-11-05 17:45:50 +00:00
parent a39226ff23
commit e89c63070b
3 changed files with 10 additions and 17 deletions

View File

@@ -1328,6 +1328,8 @@ function ItemList(id) //{{{
return row;
}
function getCompletion(index) completionElements[index - startIndex];
/**
* uses the entries in completions to fill the listbox
* does incremental filling to speed up things
@@ -1436,7 +1438,7 @@ function ItemList(id) //{{{
if (index == -1 || index == completions.length) // wrapped around
{
if (selIndex >= 0)
completionElements[selIndex - startIndex].removeAttribute("selected");
getCompletion(selIndex).removeAttribute("selected");
else // list is shown the first time
fill(0);
selIndex = -1;
@@ -1454,20 +1456,16 @@ function ItemList(id) //{{{
newOffset = Math.max(newOffset, 0);
if (selIndex > -1)
completionElements[selIndex - startIndex].removeAttribute("selected");
getCompletion(selIndex).removeAttribute("selected");
fill(newOffset);
selIndex = index;
completionElements[index - startIndex].setAttribute("selected", "true");
getCompletion(index).setAttribute("selected", "true");
return;
},
onEvent: function (event)
{
return false;
}
onEvent: function (event) false
};
//}}}
}; //}}}