simplify autoscroll behaviour
simplify context.js