Prevent double click when switching betweeen pages with the left and right bar