# Confusing UX on Replace Dialog after pressing Enter key

**URL:** <https://forum.appflowy.com/t/confusing-ux-on-replace-dialog-after-pressing-enter-key/60>\
**Category:** Bug Reports\
**Tags:** editor\
**Created:** [August 12, 2023, 12:42pm UTC](https://forum.appflowy.com/t/confusing-ux-on-replace-dialog-after-pressing-enter-key/60 "2023-08-12T12:42:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mayur](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.appflowy.com/mayur/32/17_2.png) [@Mayur](https://forum.appflowy.com/u/Mayur)\
**Post date:** [August 12, 2023, 12:42pm UTC](https://forum.appflowy.com/t/confusing-ux-on-replace-dialog-after-pressing-enter-key/60/1 "2023-08-12T12:42:57Z")

</div>

- While replacing a word with Replace Dialog in the AppFlowy Editor,
- we are able to replace the first match by pressing Enter key
- But then the focus shifts into the Editor and now pressing the Enter key inserts a newline character instead of replacing the next match.

Steps to reproduce:

1. Open AppFlowy Editor
2. Open Replace Dialog
3. Enter a find string and a replace string.
4. Now focusing on the Replace string press Enter
5. Now press enter again.

Expected behavior after 5:  
The next matched word should be replaced.

Actual behavior after 5:  
New line character is inserted

Screenshot:  
 ![replace_ux](https://us1.discourse-cdn.com/flex016/uploads/appflowy/original/1X/b7ca0137e003e0c19d3427e71de4c7be96962c57.gif)

Possible Solution:

1. Don’t use Enter for Replacing the first match, thus only way to replace is by clicking the replace icon.
2. Return focus back to the Replace dialog.
