refactering.

scroll target not hit if in elements gap