getActiveView() inconsistency

I discovered that, in the File Manager, $$(“files”).getActiveView() is absolutely inconsistent, and that right licking multiple times over the filetree view return some times returns “filetable”.

Is this a known issue?
is there any way to consistently now in which view the right click originated inorder to properly filter contextual action menu?

thanks

Hello,

You can get the view where Menu is shown from its “context” (getContext() method):

view:"filemanager",
id:"files",
menuFilter: function(item){
    var menu = $$("files").getMenu();
    var context = menu.getContext();
    var view = context.obj;
     ....
    return true
},
...