twitter/bootstrap — pull request #1991 by emerencia (2012-02-15 10:27:56+00:00)
Title: Fix to make toggling work properly for radio/checkbox buttons that have icons

Right now, clicking a radio/checkbox button* that has an icon only changes its state when the text of the button or the edge of the button around the icon is clicked. When the icon of the button is clicked, the state of the button is not toggled.

This fix makes toggling buttons work by making sure the element to be toggled is actually a "button" or an "a" element and not the "i" tag that holds the image inside of it.

*) This applies to the radio/checkbox buttons that are part of a .btn-group. Not the input elements.