When we are in a hurry to go somewhere, people sometimes stop us and compel us listen to their problems. They just refuse to let us go. What they are doing is buttonholing us. It is as if they have a finger in one of the buttonholes and are forcing us to listen.
*The people buttonholed the candidate and explained their problems.
The original expression was “to button hold someone”. The person forced you to listen by holding on to your button. As the years went by, “button hold” became “buttonhole”.