Fixing text edit submission code to not annoy the JS interpreter.