fix: never toggle task mode on input or textarea element
some changes for unit testability