-
Notifications
You must be signed in to change notification settings - Fork 674
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 selection after mousedown if contenteditable div contains only one new line char (#2365) #2426
Conversation
❌ Tests for the commit 5c70900 have failed. See details: |
❌ Tests for the commit 01a5add have failed. See details: |
❌ Tests for the commit d85efd1 have failed. See details: |
1 similar comment
❌ Tests for the commit d85efd1 have failed. See details: |
❌ Tests for the commit ace9fe3 have failed. See details: |
❌ Tests for the commit ace9fe3 have failed. See details: |
✅ Tests for the commit ace9fe3 have passed. See details: |
@@ -210,8 +214,15 @@ export function isInvisibleTextNode (node) { | |||
return firstVisibleIndex === nodeValue.length && lastVisibleIndex === 0; | |||
} | |||
|
|||
function checkTextNodeVisibility (node, onlyVisible) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me it seems little awkward that method named checkTextNodeVisibility
can do not check visibility if we pass onlyVisible === false
.
@AndreyBelym
const whiteSpacePreStyles = ['pre', 'pre-wrap', 'pre-line']; | ||
|
||
while (el !== container) { | ||
el = el.parentNode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a blank line
❌ Tests for the commit 7ed811b have failed. See details: |
1 similar comment
❌ Tests for the commit 7ed811b have failed. See details: |
✅ Tests for the commit 7ed811b have passed. See details: |
@@ -137,6 +138,10 @@ export function getFirstVisibleTextNode (el) { | |||
return child; | |||
} | |||
|
|||
export function getFirstVisibleTextNode (el) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need this function anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is used in several places.
I think it's more convenient to write getFirstVisibleTextNode()
instead of getFirstTextNode(true)
…e new line char (DevExpress#2365) (DevExpress#2426) * fix selection after mousedown if contenteditable div contains only one new line char (DevExpress#2365) * remove confusing function
No description provided.