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

Using BR tag as enter element results reset of cursor while typing in newlines. #860

Closed
ferrykranenburgcw opened this issue Jul 1, 2022 · 3 comments

Comments

@ferrykranenburgcw
Copy link

Jodit Version: 3.18.4

Browser: Chrome
OS: Windows
Is React App: False

Expected behavior:

When we use BR as our enter element then after a few new lines, starting to type makes our cursor jump the first character of the newline. So if my sentence starts with Test then it would result in estT because after the first input the cursor is being reset. The problem is easy to reproduce on your playground by setting BR as the enter element. I have included a video where I show the difference.

Actual behavior:

You can see a video of this behaviour here: https://vimeo.com/725984938/aa84b59caf

@ferrykranenburgcw
Copy link
Author

Downgrading to Jodit version 3.17.1 fixes this for now.

@xdan xdan added the bug label Aug 15, 2022
xdan added a commit that referenced this issue Aug 21, 2022
@xdan xdan added the fixed label Aug 21, 2022
@xdan xdan closed this as completed Aug 29, 2022
@GonzaloManoukian
Copy link

Hii! This keeps happening to me using "jodit-pro-react ^1.3.39" (current to date) :(

@SharePointPro
Copy link

Just confirming this bug still exists, even i the latest version.
I had to go back to 3.17.1

To replicate:


 joditConfig = {
                beautifyHTML: false,
                width: "100%",
                enter: "br",
                enterBlock: "div",
                tabIndex: tabIndex,
                useSplitMode: false,
                buttonsXS: [],
            };

var editor = jodit.Jodit.make("#" + id, joditConfig);

Then press Enter on a new line and start typing. every new line besides the first will reset the cursor to position 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants