Replace a hack by a better one... before opening tree leaves, move the inputs out of the <a> so that the <a>'s event aren't applied to the input.