Correctly setting the border and image click