mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
Merge pull request #13 from HeyPuter/ignore-delete-when-renaming-files
Don't delete files when delete key is pressed while renaming something
This commit is contained in:
commit
e974b76c01
@ -1349,10 +1349,13 @@ window.initgui = async function(){
|
|||||||
else{
|
else{
|
||||||
$selected_items = $(active_element).closest('.item-container').find('.item-selected');
|
$selected_items = $(active_element).closest('.item-container').find('.item-selected');
|
||||||
if($selected_items.length > 0){
|
if($selected_items.length > 0){
|
||||||
|
// Only delete the items if we're not renaming one.
|
||||||
|
if ($selected_items.children('.item-name-editor-active').length === 0) {
|
||||||
move_items($selected_items, trash_path);
|
move_items($selected_items, trash_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
// A letter or number is pressed and there is no context menu open: search items by name
|
// A letter or number is pressed and there is no context menu open: search items by name
|
||||||
|
Loading…
Reference in New Issue
Block a user