fix tracking of text and form modes
add functionality for canceling task edit