Correct swiping to open and close a menu