Skip to content

Conversation

@lqez
Copy link
Member

@lqez lqez commented Apr 29, 2020

What does this PR do?

  • fix: Fixed #3112 #3113 and fixed not using p-br tag #3498 fixed paste-related issue for some cases. But they causes another problem.
  • When we insert new nodes, dom.splitPoint is called and it creates empty node(<p><br></p>). Actually, we don't need to create it but the empty node is needed for placing the caret. Without an empty node, user cannot place their caret where they would be.
  • But dom.splitPoint creates a lot of empty paragraph while processing nodes. So fixed not using p-br tag #3498 added checking logic for empty nodes but it causes another issue which is described on DOMException: Failed to execute 'setEnd' on 'Range' #3678.
  • This patch removes the empty paragraph which was created by dom.splitPoint after inserting new nodes when it should be deleted.

What are the relevant tickets?

Checklist

  • added relevant tests
  • didn't break anything

@lqez lqez requested a review from easylogic April 29, 2020 21:28
@lqez lqez added this to the v0.8.17 milestone Apr 29, 2020
@lqez lqez merged commit 99acd1d into develop May 2, 2020
@lqez lqez deleted the fix-nextpoint-bug branch May 2, 2020 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants