Fix right click popup and collapse js of UITree