web: Type-cast inputs (fixes #130)
Make sure to cast to int() on focus, just in case.