Prevent clicks outside the input box