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

First alteration of a text after pasting (ctrl+v) does not trigger 'change' event #666

Merged
merged 8 commits into from
Aug 18, 2017

Conversation

wojtekw92
Copy link
Contributor

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?

style, and tags fixes in PR #308

closes #554

@Comandeer Comandeer self-requested a review July 21, 2017 15:47

<script>
var i = 1;
var changes = $( "#changes" );
Copy link
Member

Choose a reason for hiding this comment

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

Test is not working as Bender does not include jQuery by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@@ -0,0 +1,10 @@
@bender-tags: 13763, 4.7.1, bug
Copy link
Member

Choose a reason for hiding this comment

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

Please update version tag and add GitHub issue number alongside trac one.

* Stop ignoring `input` events.
*/
activateInputEventListener: function() {
this.ignoreInputEvent = false;
Copy link
Member

Choose a reason for hiding this comment

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

This instruction should be indented.

@@ -1080,6 +1087,9 @@
editable.attachListener( editable, 'paste', that.ignoreInputEventListener, that, null, 999 );
editable.attachListener( editable, 'drop', that.ignoreInputEventListener, that, null, 999 );

// After paste we need to re-enable input event listener
editor.on( 'afterPaste', that.activateInputEventListener, that );
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if there shouldn't be same priority for this listener as for ones above.

@@ -180,6 +180,27 @@
// After setting text - caret is moved to beginning. We don't care - it does not change nothing.
keyTools.keyEvent( keyCodesEnum.LEFT, null, true );
} );
},

// 13763
Copy link
Member

Choose a reason for hiding this comment

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

Please add GitHub issue number.

},

// 13763
'test change event not fired on type after paste': function() {
Copy link
Member

Choose a reason for hiding this comment

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

Isn't the test checking the exact opposite?

@Comandeer Comandeer self-requested a review July 31, 2017 09:54
@@ -0,0 +1,10 @@
@bender-tags: 554, 4.7.1, bug, jquery
Copy link
Member

Choose a reason for hiding this comment

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

Actually I was thinking about rewriting the test using our DOM API. It shouldn't be hard and there won't be unnecessary dependency.

Also, please change version tag. And I think that this test could be moved to other undo tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

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.

3 participants