moved autoclose to work with non-inputs

Autoclose does not work without an input, but they don't seem to be dependent on one another. I moved the check out of the input element check. But possibly they are related in some way I didn't notice?