Reposition the viewport if a clickinput event wants to click on an element outside the viewport