View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0019283 | MMW 5 | Extensions framework | public | 2022-07-25 20:50 | 2022-07-26 17:48 |
Reporter | zvezdan | Assigned To | |||
Priority | none | Severity | minor | Reproducibility | always |
Status | feedback | Resolution | open | ||
Summary | 0019283: navUtils.getFocusedNode() in 'focuschange' event handler returns wrong dataSource.path | ||||
Description | navUtils.getFocusedNode() in 'focuschange' event handler returns wrong dataSource.path with the drive letter only, even for sub-folders, e.g. instead of 'f:\\Temp\\' it returns 'F:-' | ||||
Steps To Reproduce | Here is the code: app.listen(window.currentTabControl.mediatree.controlClass.dataSource, 'focuschange', function (e) { var oSelNode = navUtils.getFocusedNode(); console.log('oSelNode: ' + (oSelNode ? oSelNode.handlerID + ', title: "' + oSelNode.title + '", path: "' + oSelNode.dataSource.path + '", nodePath: ' + oSelNode.nodePath : '') + ', arg: ', (e), (oSelNode)); }); | ||||
Tags | No tags attached. | ||||
Fixed in build | |||||
|
Similarly like in case of 0019282 I am unable to replicate, works fine for me even after reverting of 0019270 |
|
Does this happen on clean install with all scripts disabled? |
|
You are right, this doesn't happen on a clean install. But it is enough to create just one script with the init.js containing the mentioned lines and it will happen. The 'focuschange' event handler is doing it somehow. I didn't try with the alert dialog box, you should test it with the DevTools / Console opened. The test code in the related issue is also tested in DevTools. |
|
OK, so I will definetly need the sample script to be able to replicate the issue. |
|
It seems it happens only with folders from Location folder, not from the Folders branch. |
|
And here is another approach to the same problem, it has this in init.js: nodeHandlers.dbfolder.menuAddons = nodeHandlers.dbfolder.menuAddons || []; nodeHandlers.dbfolder.menuAddons.push(function (oCurrNode) { var sFolder = oCurrNode.dataSource.path; console.log('dbfolder: "' + sFolder + '"', (oCurrNode)); return []; }); nodeHandlers.folder.menuAddons = nodeHandlers.folder.menuAddons || []; nodeHandlers.folder.menuAddons.push(function (oCurrNode) { var sFolder = oCurrNode.dataSource.path; console.log('folder: "' + sFolder + '"', (oCurrNode)); return []; }); nodeHandlers.drive.menuAddons = nodeHandlers.drive.menuAddons || []; nodeHandlers.drive.menuAddons.push(async function (oCurrNode) { var sFolder = oCurrNode.dataSource.path; console.log('drive: "' + sFolder + '"', (oCurrNode)); return []; }); |
|
Only nodes from the Location branch are affected with the second script as well. |