Fix: can't set the overlay position for element with animation or transition