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

fix: console error when creating a list with inline style (close #221) #222

Merged
merged 2 commits into from
Jun 28, 2018

Conversation

kyuwoo-choi
Copy link
Member

Please check if the PR fulfills these requirements

  • It's the right issue type on the title
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • It does not introduce a breaking change or has a description of the breaking change

Description

#221


Thank you for your contribution to TOAST UI product. 🎉 😘 ✨

range.setStart(newLIs[0].firstChild, startOffset);
range.setEnd(newLIs[newLIs.length - 1].firstChild, endOffset);
range.setStart(newStartContainer, startOffset);
range.setEnd(newEndContainer, endOffset);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

위에 ol.js, task.js와 비슷한 패턴이 반복해서 쓰이는것 같음으로 재사용할 여지가 많으면, 중복된 패턴을 모아서 함수로 만들어도 좋을것 같습니다.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

옙!

@jinwoo-kim-nhn
Copy link

수고하셨습니다. 리뷰 완료했습니다.

@seonim-ryu
Copy link
Member

[6/26] 저도 이견 없습니다. 고생하셨어요~

@kyuwoo-choi kyuwoo-choi merged commit 6e4587f into master Jun 28, 2018
@kyuwoo-choi kyuwoo-choi deleted the fix/list_selection_range branch June 28, 2018 02:39
Copy link
Member

@shiren shiren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다!!

*/
const containsNode = function(root, node) {
const walker = document.createTreeWalker(root, 4, null, false);
let found = root === node;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

괄호 하나 쳐주시면 읽기 좋을것 같아요

let found = root === node;

while (!found && walker.nextNode()) {
found = walker.currentNode === node;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도

* @returns {Range} - range instance
* @memberof WysiwygEditor
*/
setSelectionByContainerAndOffset(startContainer, startOffset, endContainer, endOffset) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 친구는 TC 만들기 쉬울것 같은데 빠져있네요?

seonim-ryu pushed a commit that referenced this pull request Jan 2, 2020
#222)

* fix: console error when creating a list with inline style

* refactor: apply code review (#222)
seonim-ryu pushed a commit that referenced this pull request Jan 6, 2020
#222)

* fix: console error when creating a list with inline style

* refactor: apply code review (#222)
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.

4 participants