Take into account that an input element may represent a button

issue #2