-
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 issue with Chrome and whitespaces (#2365) #2388
Conversation
❌ Tests for the commit 4b8a91a have failed. See details: |
❌ Tests for the commit 808092c have failed. See details: |
@testcafe-build-bot \retest |
❌ Tests for the commit 1159c35 have failed. See details: |
@testcafe-build-bot \retest |
❌ Tests for the commit 1159c35 have failed. See details: |
✅ Tests for the commit 1159c35 have passed. See details: |
\cc @AndreyBelym |
@@ -145,6 +145,9 @@ function _typeTextToContentEditable (element, text) { | |||
var endNode = currentSelection.endPos.node; | |||
var needProcessInput = true; | |||
var needRaiseInputEvent = true; | |||
var textInputData = text; | |||
|
|||
text = text === ' ' ? String.fromCharCode(160) : text; |
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.
Text won't be a single char when typingOptions.paste
is set to true
. https://devexpress.github.io/testcafe/documentation/test-api/actions/action-options.html#typing-action-options
if (!browserUtils.isFirefox) { | ||
asyncTest('textInput eventArgs.data should contain space but not )', function () { | ||
var editor = document.createElement('div'); | ||
var text = ' '; |
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.
Use more complex complex value here (at least Hello world
).
❌ Tests for the commit d69d7b3 have failed. See details: |
❌ Tests for the commit d69d7b3 have failed. See details: |
@testcafe-build-bot \retest |
❌ Tests for the commit d69d7b3 have failed. See details: |
@testcafe-build-bot \retest |
❌ Tests for the commit d69d7b3 have failed. See details: |
@testcafe-build-bot \retest |
❌ Tests for the commit d69d7b3 have failed. See details: |
@@ -11,6 +11,7 @@ var domUtils = testCafeCore.domUtils; | |||
var contentEditable = testCafeCore.contentEditable; | |||
var textSelection = testCafeCore.textSelection; | |||
|
|||
const WHITE_SPACES_RE = /\s/g; |
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.
Don't use \s
, because it matches newline characters.
❌ Tests for the commit 19cab01 have failed. See details: |
@testcafe-build-bot \retest |
❌ Tests for the commit 19cab01 have failed. See details: |
@testcafe-build-bot \retest |
❌ Tests for the commit 19cab01 have failed. See details: |
❌ Tests for the commit 19cab01 have failed. See details: |
✅ Tests for the commit 19cab01 have passed. See details: |
) * fix issues with Chrome and whitespaces (DevExpress#2365) * fix review remarks
No description provided.