How is that weird behaviour? That's perfectly expected behaviour, it's waiting for you to press a controller button or move an axis. Until you do, it's in configure mode for that control.
I guess we could do with adding functionality to cancel that...
The other buttons should reset when you assign another control so it's clear which is being assigned. If instead assigning multiple controls at once (which would be weird) is possible it should be possible to deselect the control. I know the code resets the button state after assigning, but if there's no controller the buttons are never reset, and are left in that state.
Okay, yep, I see. The other buttons should be made unselectable when the controller configuration is in progress I suppose.