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

Action affect line under selected #852

Closed
Max0nyshchenko opened this issue Aug 13, 2021 · 6 comments
Closed

Action affect line under selected #852

Max0nyshchenko opened this issue Aug 13, 2021 · 6 comments
Labels
Projects
Milestone

Comments

@Max0nyshchenko
Copy link
Contributor

Describe the bug
When you select a line with a triple mouse click and press ctrl-i, for example, it selects and modifies the line under it too.

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://suneditor.com/sample/index.html
  2. Triple click on the line "The SunEditor is based..."
  3. Press ctrl-i or ctrl-b
  4. See line "SunEditor is a lightweight..." modified too

Expected behavior
To modify only the selected line

Desktop (please complete the following information):

  • OS: MacOS, Ubuntu
  • Browser : Chrome
  • Version: 92.0.4515.107 (Official Build) (64-bit)
@JiHong88
Copy link
Owner

@Max0nyshchenko I already know of this issue.
But I haven't found a solution yet. :(
I'll notify you know when it's resolved.

@JiHong88 JiHong88 added this to To do in suneditor via automation Aug 18, 2021
@JiHong88 JiHong88 added the bug label Aug 18, 2021
@Max0nyshchenko
Copy link
Contributor Author

@JiHong88 Thank you for your response, I was trying to fix it, but all in vain after 5hours of work. If I find time I'll get back to it.

@matteocollina
Copy link

@Max0nyshchenko I've just found the potential problem in core.js in the return line on function getSelectedElements:
lineNodes.slice(startIdx, endIdx + 1) gets the current element selected and the next one. However when you try to reselect the text, the builder doesn't recognize that that text was edited.

matteocollina pushed a commit to DMA-digital-for-business/SunEditor that referenced this issue Aug 27, 2021
@Max0nyshchenko
Copy link
Contributor Author

@matteocollina So I see you didnt push fixes? I didn't have time to work on it since

@matteocollina
Copy link

@JiHong88 @Max0nyshchenko I'm waiting for the approval of my pull request #864

@JiHong88 JiHong88 added this to the 2.42.0 milestone Nov 26, 2021
JiHong88 added a commit that referenced this issue Nov 27, 2021
Action affect line under selected when triple click
suneditor automation moved this from To do to Done Nov 27, 2021
@JiHong88
Copy link
Owner

The 2.42.0 version has been updated.
If this issue has not been resolved, please reopen this issue.
Thank you.

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

No branches or pull requests

3 participants