Adds check for valid gesture in move event handler