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

CTRL+A forces focus on editor starting and/or ending with a list in it's content #1719

Closed
casjonker opened this issue Feb 27, 2018 · 4 comments
Labels
browser:chrome The issue can only be reproduced in the Chrome browser. browser:safari The issue can only be reproduced in the Safari browser. plugin:divarea The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. target:minor Any docs related issue that can be merged into a master or major branch. type:bug A bug.
Milestone

Comments

@casjonker
Copy link

casjonker commented Feb 27, 2018

Are you reporting a feature request or a bug?

The strangest thing: In Chrome, using CTRL+A anywhere on the page will give an unexpected result while there is a list set at the beginning and/or end of the content in the editor. It sets the focus on the editor containing the list.

Since we are using multiple editors on one page, this results in a focus shift from the editor without list to the editor of which the content starts and/or ends in a list.

Only happens with divarea

Provide detailed reproduction steps (if any)

Strange behaviour with list:

  1. Add a list in the editordivarea (make sure the content starts or ends with a list)
  2. Remove focus from the editor
  3. Hit CTRL+A, see how focus turns to editor...
  4. Remove focus from the editor
  5. Hit CTRL+A, expected behaviour is back

Expected result

Expected behaviour:

  1. Type some tekst in an editor divarea
  2. Remove focus from the editor
  3. Hit CTRL+A

Actual result

Other details

  • Browser: Chrome, Safari
  • OS: Windows
  • CKEditor version: 4.7.2
  • Installed CKEditor plugins: divarea
@casjonker
Copy link
Author

casjonker commented Feb 27, 2018

Solved it for now by overriding the widgetselection plugin. Threw in the following at the top of the addFillers function:

if (!editor.focusManager.hasFocus) {
    return false;
}

@jacekbogdanski jacekbogdanski self-assigned this Mar 1, 2018
@jacekbogdanski jacekbogdanski added type:bug A bug. status:confirmed An issue confirmed by the development team. plugin:divarea The plugin which probably causes the issue. labels Mar 1, 2018
@jacekbogdanski
Copy link
Member

Hello,

I can reproduce the issue using our latest version of CKEDITOR 4. It would be great if you could push pull request with your bug fix. If you would like to contribute, please be sure that you prepared tests to cover your changes. You can read more about contributing to CKEDITOR here.

@jacekbogdanski jacekbogdanski removed their assignment Mar 1, 2018
@jacekbogdanski jacekbogdanski reopened this Mar 1, 2018
@mlewand mlewand added the target:minor Any docs related issue that can be merged into a master or major branch. label Apr 4, 2018
@mlewand mlewand added the browser:chrome The issue can only be reproduced in the Chrome browser. label Jul 31, 2018
@mlewand
Copy link
Contributor

mlewand commented Jul 31, 2018

I made an online demo where the issue could be reproduced: https://codepen.io/mlewand/pen/MBQevG

@mlewand mlewand added the browser:safari The issue can only be reproduced in the Safari browser. label Jul 31, 2018
@mlewand
Copy link
Contributor

mlewand commented Jul 31, 2018

The issue is also reproducible on Safari.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser:chrome The issue can only be reproduced in the Chrome browser. browser:safari The issue can only be reproduced in the Safari browser. plugin:divarea The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. target:minor Any docs related issue that can be merged into a master or major branch. type:bug A bug.
Projects
None yet
Development

No branches or pull requests

3 participants