MOB-1983 Fix for keepInView in Safari

Created new PR because the previous one was merged to master instead of dev.