Proper close image and only update note if text not empty.