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

Fix type error while opening context menu in readonly editor #2331

Merged
merged 10 commits into from
Sep 1, 2018
Merged

Conversation

Comandeer
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've added a simple check to open context menu only if there is selection inside the editor. In Chrome there is no selection inside the editor before the first focus. Unfortunately it required to update tests connected to context menu as many of them were fired on editor without the selection.

Closes #1181.

@mlewand mlewand added the review:easy Pull requests that can be reviewed by a Junior Developer before being reviewed by the Reviewer. label Aug 21, 2018
@jacekbogdanski jacekbogdanski self-assigned this Aug 31, 2018
Copy link
Member

@jacekbogdanski jacekbogdanski left a comment

Choose a reason for hiding this comment

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

Please rebase PR into the latest upstream.

CHANGES.md Outdated
@@ -21,6 +21,7 @@ Fixed Issues:
* [#1916](https://github.com/ckeditor/ckeditor-dev/issues/1916): [IE9-11] Fixed: Pressing <kbd>Delete</kbd> key in [read-only mode](https://docs.ckeditor.com/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) throws an error.
* [#2254](https://github.com/ckeditor/ckeditor-dev/issues/2254): Fixed: [Image](https://ckeditor.com/cke4/addon/image) ratio locking is too precise for resized images. Thanks to [Jonathan Gilbert](https://github.com/logiclrd)!
* [#2003](https://github.com/ckeditor/ckeditor-dev/issues/2003): Fixed: Right-clicking on multiple selected cells containing empty paragraphs removes the selection on Firefox.
* [#1181](https://github.com/ckeditor/ckeditor-dev/issues/1181): [Chrome] Fixed: Opening context menu in readonly editor results in error.
Copy link
Member

Choose a reason for hiding this comment

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

Update changelog entry into 4.10.2.

@@ -245,6 +246,16 @@
} );
} );

// Force selection in the editor as opening menu
// by user always results in selection.
Copy link
Member

Choose a reason for hiding this comment

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

It's not totally true, otherwise, we won't have this issue.

@@ -0,0 +1,22 @@
@bender-ui: collapsed
@bender-tags: bug, 4.10.1, 1181
Copy link
Member

Choose a reason for hiding this comment

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

Update version tag into 4.10.2.

@bender-tags: bug, 4.10.1, 1181
@bender-ckeditor-plugins: wysiwygarea, toolbar, contextmenu, link, clipboard

**Test Scenario**
Copy link
Member

Choose a reason for hiding this comment

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

Please, keep our adopted manual test style:

1. ...
2. ...
3. ...
 
## Expected

...

## Unexpected

...

@Comandeer Comandeer changed the base branch from master to next August 31, 2018 09:25
@Comandeer Comandeer self-assigned this Aug 31, 2018
@Comandeer
Copy link
Member Author

Rebased onto latest next.

Copy link
Member

@jacekbogdanski jacekbogdanski left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@mlewand mlewand self-assigned this Sep 1, 2018
@mlewand mlewand self-requested a review September 1, 2018 08:56
Copy link
Contributor

@mlewand mlewand left a comment

Choose a reason for hiding this comment

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

LGTM

I made minor changes, and rebased branch onto next where I resolved minor conflict in CHANGES.md file.

@mlewand mlewand merged commit 916dccd into next Sep 1, 2018
@CKEditorBot CKEditorBot deleted the t/1181 branch September 1, 2018 09:46
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.

3 participants