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

Fixed issue with invalid commands state refresh #2297

Merged
merged 5 commits into from
Sep 3, 2018
Merged

Fixed issue with invalid commands state refresh #2297

merged 5 commits into from
Sep 3, 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?

A selection wasn't refreshed for touch events and in the result, commands weren't correctly refreshed on iOS. I added appropriate event listeners for selection.

Note: Unit and manual tests are enabled on each browser for simplicity and future changes.

Closes #2276

@mlewand mlewand requested a review from Comandeer August 13, 2018 08:15
@Comandeer Comandeer assigned Comandeer and unassigned Comandeer Aug 13, 2018
@mlewand mlewand added the review:easy Pull requests that can be reviewed by a Junior Developer before being reviewed by the Reviewer. label Aug 13, 2018
@mlewand mlewand requested review from msamsel and removed request for Comandeer August 13, 2018 13:58
Copy link
Contributor

@msamsel msamsel left a comment

Choose a reason for hiding this comment

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

Overall it seems to work fine for me. I couldn't reproduce the issue on my mobile any longer.

@@ -149,6 +149,14 @@ bender.test( {
}, 200 );
},

// (#2276)
'test "selectionCheck" fires properly': function() {
testSelectionCheck( this.editors.editor, 'touchstart', 'Fire touchstart.' );
Copy link
Contributor

Choose a reason for hiding this comment

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

Assert message is used as a comment instead of giving reason why assert failed. In error situation you will get message "Fire touchstart" what might be confusing for the user.

@bender-ui: collapsed
@bender-ckeditor-plugins: wysiwygarea, link, toolbar

1. Set cursor position inside a link.
Copy link
Contributor

Choose a reason for hiding this comment

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

Description is superficial. As a reader I don't know where to focus my attention, especially in builded editor, where all plugins will be loaded. Maybe you could use something like:

Pay attention to unlink button status in following situations:

  1. Cursor position inside link.
  2. (...)

@@ -149,6 +149,14 @@ bender.test( {
}, 200 );
},

// (#2276)
'test "selectionCheck" fires properly': function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

"fires properly" seems to be too general description. WDYT about "fires for: mouse, key and touch events"

@msamsel msamsel changed the base branch from master to next September 3, 2018 09:38
@msamsel
Copy link
Contributor

msamsel commented Sep 3, 2018

I've rebase it to next, change target branch and update to tags for 4.10.2

Copy link
Contributor

@msamsel msamsel left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:easy Pull requests that can be reviewed by a Junior Developer before being reviewed by the Reviewer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants