зеркало из https://github.com/mozilla/gecko-dev.git
fix to bug 120347 - Hitting the delete key should delete entry
Added a "onkeypress" to the tree to handle backspace & delete events
This commit is contained in:
Родитель
770b0c5cc4
Коммит
667ca273e2
|
@ -338,6 +338,19 @@ function unifinderRemoveCommand()
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is called from the unifinder when a key is pressed in the categories tree
|
||||
*/
|
||||
|
||||
function onUnifinderCategoriesKeyPress(event)
|
||||
{
|
||||
if ((event.keyCode == 8)||(event.keyCode == 46))
|
||||
{
|
||||
unifinderRemoveCommand();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is called from the unifinder when a key is pressed in the search field
|
||||
*/
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<tabpanels orient="horizontal" flex="1">
|
||||
<vbox id="unifinder-categories-box" flex="1">
|
||||
<vbox id="unifinder-categories-content-box" flex="1" >
|
||||
<tree id="unifinder-categories-tree" class="unifinder-tree-class" flex="1" >
|
||||
<tree id="unifinder-categories-tree" class="unifinder-tree-class" flex="1" onkeypress="onUnifinderCategoriesKeyPress(event)">
|
||||
<treechildren id="unifinder-categories-tree-children" flex="1"/>
|
||||
</tree>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче