Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot move to next line in contenteditable div #249

Closed
9 tasks done
CodeWithOz opened this issue Jun 26, 2021 · 8 comments
Closed
9 tasks done

Cannot move to next line in contenteditable div #249

CodeWithOz opened this issue Jun 26, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@CodeWithOz
Copy link

  • System Information

    • Browser type and version: Chrome webview 91.0.4472.101 on Android
    • OS type and version: Android 8.1.0, using cordova 9 and 10
    • Any error messages in the JS console: none
  • Describe the bug

Using this library for a contenteditable div, pressing the "Enter" key doesn't cause the cursor to move to the next line. Essentially I can't create a new line using the "Enter" key. The correct behavior is that I should be able to create as many new lines as I want without this library preventing that behavior.

  • To Reproduce
    Steps to reproduce the behavior: <!-- Example below-!>
  1. Download the APK available here
  2. After opening the app, type into the text field (green-blue box) and hit the "Enter" key to create a new line. It doesn't work. You can clear all the text you've typed and try creating a new line, it still won't work.
  • Expected behavior
    Pressing the "Enter" key should always create a new line

  • Screenshots or GIF's (optional, but HIGHLY RECOMMENDED)
    Not applicable

  • Additional context (optional)
    This is for a cordova app as described earlier.

@CodeWithOz CodeWithOz added the bug Something isn't working label Jun 26, 2021
@TarekRaafat
Copy link
Owner

Hello @CodeWithOz,

Thank you for reporting your use case.
I've already implemented in the coming version v10.2 a solution for such use cases.

Cheers, and have a nice day! :)

@CodeWithOz
Copy link
Author

Awesome work, thanks! When can we expect v10.2 to be released?

@TarekRaafat
Copy link
Owner

Thanks! v10.2 will be released early next week.

TarekRaafat added a commit that referenced this issue Jul 3, 2021
@CodeWithOz
Copy link
Author

@TarekRaafat hey it seems the problem isn't fully fixed, now I can only create one newline at a time. If the line I'm on doesn't contain any text, I can't create another new line. Is that expected? If so, can I disable it? Previously I used to be able to create as many newlines as I wanted even if they were all empty.

@CodeWithOz CodeWithOz reopened this Jul 29, 2021
@TarekRaafat
Copy link
Owner

Hello @CodeWithOz,

Are you using v10.2.6 with the submit API?

@CodeWithOz
Copy link
Author

No I'm not using it. I don't specify it in my config and from the docs the default is false, so that should mean it's disabled.

@TarekRaafat
Copy link
Owner

No I'm not using it. I don't specify it in my config and from the docs the default is false, so that should mean it's disabled.

You need to set submit to true to enable the default enter button behavior, which is disabled by default.

Would you please try it and let me know how it goes?

@CodeWithOz
Copy link
Author

@TarekRaafat yep that was the fix, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants