But there is a problem with it not working in thumbnail mode.
So I changed the script as follows and it works normally.
function OnDoubleClick(doubleClickData) {
if (doubleClickData.mouse != "none") { // ensure we react only when *not* triggered by mouse (such as middle double-click)
doubleClickData.call = false;
return false;
}
return handleOnDoubleClick(doubleClickData); // from docs: "If you return True, the double-click will be cancelled and the file will not be opened. If you return False the double-click will be allowed to continue (this is the default)."
}
Remove the if statement as follows.
function OnDoubleClick(doubleClickData) {
return handleOnDoubleClick(doubleClickData); // from docs: "If you return True, the double-click will be cancelled and the file will not be opened. If you return False the double-click will be allowed to continue (this is the default)."
}