Making return key functionality work