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 selection after mousedown if contenteditable div contains only one new line char (#2365) #2426

Merged
merged 2 commits into from
May 28, 2018

Conversation

AlexKamaev
Copy link
Contributor

No description provided.

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit 5c70900 have failed. See details:

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit 01a5add have failed. See details:

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit d85efd1 have failed. See details:

1 similar comment
@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit d85efd1 have failed. See details:

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit ace9fe3 have failed. See details:

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit ace9fe3 have failed. See details:

@testcafe-build-bot
Copy link
Collaborator

✅ 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) {
Copy link
Collaborator

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;
Copy link
Collaborator

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

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit 7ed811b have failed. See details:

1 similar comment
@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit 7ed811b have failed. See details:

@testcafe-build-bot
Copy link
Collaborator

✅ Tests for the commit 7ed811b have passed. See details:

@@ -137,6 +138,10 @@ export function getFirstVisibleTextNode (el) {
return child;
}

export function getFirstVisibleTextNode (el) {
Copy link
Collaborator

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

Copy link
Contributor Author

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)

@AlexKamaev AlexKamaev merged commit 8274923 into DevExpress:master May 28, 2018
kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this pull request Dec 18, 2019
…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
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