-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Conversation
tests/tickets/13763/1.html
Outdated
|
||
<script> | ||
var i = 1; | ||
var changes = $( "#changes" ); |
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.
Test is not working as Bender does not include jQuery by default.
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.
fixed
tests/tickets/13763/1.md
Outdated
@@ -0,0 +1,10 @@ | |||
@bender-tags: 13763, 4.7.1, bug |
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 update version tag and add GitHub issue number alongside trac one.
plugins/undo/plugin.js
Outdated
* Stop ignoring `input` events. | ||
*/ | ||
activateInputEventListener: function() { | ||
this.ignoreInputEvent = false; |
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 instruction should be indented.
plugins/undo/plugin.js
Outdated
@@ -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 ); |
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 wonder if there shouldn't be same priority for this listener as for ones above.
tests/plugins/undo/change.js
Outdated
@@ -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 |
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 GitHub issue number.
tests/plugins/undo/change.js
Outdated
}, | ||
|
||
// 13763 | ||
'test change event not fired on type after paste': function() { |
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.
Isn't the test checking the exact opposite?
tests/tickets/13763/1.md
Outdated
@@ -0,0 +1,10 @@ | |||
@bender-tags: 554, 4.7.1, bug, jquery |
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.
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.
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.
fixed
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
What changes did you make?
style, and tags fixes in PR #308
closes #554