Improve toc popup in js mode
inclusive a temporary fix for vector template