Prevent click event on close panel