-
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
Fixed emoji text matching with repeated symbols in a single line #2452
Conversation
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.
Looks that the fix was much simpler than I originally anticipated.
Neat idea with making the tests synchronous!
I found just minor annoyances, I'll correct these in a minute and we're good to go.
tests/plugins/emoji/basic.js
Outdated
@@ -31,6 +31,12 @@ | |||
|
|||
var stub = null; | |||
|
|||
// Disable autocomplete throttling so the tests can be run synchronously. | |||
var throttle = CKEDITOR.tools.buffers.throttle; |
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.
If possible try to merge subsequent var statements.
tests/plugins/emoji/basic.js
Outdated
wait(); | ||
bot.setHtmlWithSelection( '<p>foo :collision :collision^</p>' ); | ||
editor.editable().fire( 'keyup', new CKEDITOR.dom.event( {} ) ); | ||
assert.areSame( ':collision', autocomplete.model.query, 'Model keeps wrong querry.' ); |
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.
There should be no dots at the end of assert msg. I can see that you might have take it from other asserts in this suite.
What's interesting is that objectAssert
s have correct form 🙂
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.
typo querry -> query
<h2>Classic editor</h2> | ||
<div id="classic"></div> | ||
<h2>Inline editor</h2> | ||
<div id="inline" contenteditable="true"> |
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.
Just a detail, but since you're closing all of the tags in a single line, it would be nice to close this one as well.
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?
Emoji symbol was incorrectly matched when tested text have duplicated symbols.
Closes #2394