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

Preserved ideographic space on paste #1805

Merged
merged 4 commits into from
Mar 20, 2018
Merged

Preserved ideographic space on paste #1805

merged 4 commits into from
Mar 20, 2018

Conversation

jacekbogdanski
Copy link
Member

What is the purpose of this pull request?

Bug fix

Does your PR contain necessary tests?

All patches which change the editor code must include tests. You can always read more
on PR testing,
how to set the testing environment and
how to create tests
in the official CKEditor documentation.

This PR contains

  • Unit tests
  • Manual tests

What changes did you make?

I removed stripping ideographic space \u3000 when pasting. The issue exists on IE and Firefox but I didn't ignore this tests for other browsers. I think it's good to keep them not ignored so they will fail in the future (with invalid changes). So keep in mind that manual and unit tests could work on Chrome, Opera and Safari regardless of the changes.

Closes #1321

@mlewand mlewand requested a review from Comandeer March 16, 2018 10:03
@mlewand mlewand closed this Mar 16, 2018
@mlewand mlewand changed the base branch from next to major March 16, 2018 10:13
@mlewand mlewand reopened this Mar 16, 2018
@mlewand
Copy link
Contributor

mlewand commented Mar 16, 2018

Sorry, I've removed the next branch before rebasing all the PRs that were based on it. This PR is now rebased onto latest major (4.10.0).

Copy link
Member

@Comandeer Comandeer left a comment

Choose a reason for hiding this comment

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

Fix seems to be working, there are however some small issues.

@@ -0,0 +1,12 @@

<textarea style="height: 80px; width: 500px;">
全角スペースの削除が行われたり半角スペース変換が行われたりする
Copy link
Member

Choose a reason for hiding this comment

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

Please remove tabs and new lines at the beginning and the end. Because of these characters, pasted text seems suspicious (it's full of &nbsp;) and makes testing harder.

@@ -808,6 +808,27 @@
} );
},

// (#1321)
'htmlified text unification 7 - IDEOGRAPHIC space': function() {
Copy link
Member

Choose a reason for hiding this comment

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

This test seems possible to be simplified. Cases between browsers are very similar.

@@ -808,6 +808,27 @@
} );
},

// (#1321)
'htmlified text unification 7 - IDEOGRAPHIC space': function() {
if ( CKEDITOR.env.gecko )
Copy link
Member

Choose a reason for hiding this comment

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

Note that our styleguide requires curly braces for every if block, even if it contains only one statement.

{ type: 'text', dataValue: 'a\u3000a\u3000\u3000' },
'htmlified text - webkit' );
else
assert.isTrue( true );
Copy link
Member

Choose a reason for hiding this comment

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

Is this else really needed? Every supported browser should be caught by one of the previous ifs.

Copy link
Member

@Comandeer Comandeer left a comment

Choose a reason for hiding this comment

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

LGTM!

@Comandeer Comandeer merged commit b1e563c into major Mar 20, 2018
@Comandeer Comandeer deleted the t/1321 branch March 20, 2018 17:56
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.

Full Width space is lost when pasting text
3 participants