Only record input text if text capturing is on
Added support for text input on emscripten