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 Ctrl+A focusing inline editor if it was started and ended with a list #2274

Merged
merged 7 commits into from
Aug 3, 2018

Conversation

mlewand
Copy link
Contributor

@mlewand mlewand commented Jul 31, 2018

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?

The issue is described here: #1773 (comment)

I had to adjust the initial pull request as commented above. Also tests were added.

Follow-up of #1773.

Closes #1719.

@mlewand mlewand added the review:easy Pull requests that can be reviewed by a Junior Developer before being reviewed by the Reviewer. label Jul 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.

I didn't do full review thus multiple tests/plugins/widgetselection/integration tests failes, so the fix may change.
image

editable = editor.editable();

editable.attachListener( doc, 'keydown', function( evt ) {
editable.attachListener( editable, 'keydown', function( evt ) {
Copy link
Member

Choose a reason for hiding this comment

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

I would be nice to provide some simple explanation comment with the issue ticket reference for this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TBH I don't think it is needed there, it's fairly logical that ctrl/cmd+a should be catched from within the editable. It's actually shame that we didn't catch this earlier, because in fact it didn't make sense in case of inline editors. 🙂

@@ -4,12 +4,36 @@
( function() {
'use strict';

bender.editor = true;
bender.editors = {
editor1: {
Copy link
Member

Choose a reason for hiding this comment

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

The name doesn't tell much. Maybe classic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 84265bd.

editor1: {
creator: 'replace'
},
editor2: {
Copy link
Member

Choose a reason for hiding this comment

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

What about divarea?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 84265bd.

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 merged commit 157f0f3 into master Aug 3, 2018
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