[fr][js] fix positioning code