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

Error in console (Cannot read property 'isContextFor' of null) for list plugin #1439

Closed
luanorlandi opened this issue Jan 11, 2018 · 5 comments
Labels
browser:chrome The issue can only be reproduced in the Chrome browser. resolution:upstream Issue in the third-party software. status:confirmed An issue confirmed by the development team. type:bug A bug.

Comments

@luanorlandi
Copy link

Are you reporting a feature request or a bug?

Bug.

The issue is already reported:

There is a very similar issue resolved here #478.

Provide detailed reproduction steps (if any)

  1. Go to http://cdn.ckeditor.com/4.7.3/full-all/samples/
  2. Select part of the string (e.g. "ance of CKEditor.")
  3. Click below the text (blinking cursor will disappear)
  4. Click "List" buttons (numbered or bullet list)

ckeditor

Expected result

No JavaScript error in console.

Actual result

JavaScript error in console:

ckeditor.js:192 Uncaught TypeError: Cannot read property 'isContextFor' of null
    at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.command.refresh (ckeditor.js:192)
    at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.command.exec (ckeditor.js:948)
    at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.command.exec (ckeditor.js:192)
    at a.execCommand (ckeditor.js:260)
    at CKEDITOR.ui.button.CKEDITOR.tools.extend.click (ckeditor.js:639)
    at Object.execute (ckeditor.js:640)
    at ckeditor.js:641
    at ckeditor.js:30
    at Object.callFunction (ckeditor.js:30)
    at HTMLAnchorElement.onclick ((index):1)

Other details

  • Browser: Google Chrome (version 63.0.3239.132 (Official Build) (64-bit))
  • CKEditor version: 4.7.3
  • Installed CKEditor plugins: Full
@mlewand
Copy link
Contributor

mlewand commented Jan 11, 2018

I can confirm it. Reproduced with CKE 4.8.0 full, standard, basic preset.

Interestingly there is no selection in the editor in this case.

As someone will have a look on it here's what I see:

  • Link has no affect on this issue, it could be just a paragraph with text and it's still reproducible.
  • From what I have seen is that you need to have a ranged selection, all the way to the end of a paragraph, and then click below and after or within (left to right-wise) the selection box.

image

I was able to reproduce it on Windows 10.

On Ubuntu it's even worse, as clicking any area below the paragraph will not put a proper selection.

I'd like to know how it behaves on a MacOS.

It does look to me like a Chrome upstream issue, that we did not take seriously earlier. We could patch more, and more methods not to fail when there are no selections in the editor, but that'd not be fixing a source of issues.

@mlewand mlewand added type:bug A bug. status:confirmed An issue confirmed by the development team. browser:chrome The issue can only be reproduced in the Chrome browser. labels Jan 11, 2018
@mlewand mlewand added this to the Backlog milestone Jan 11, 2018
@mlewand
Copy link
Contributor

mlewand commented Jan 11, 2018

For the time being I'll set it as confirmed, but after a closer review I expect it will turn to an upstream. Definitely something worth checking.

@msamsel msamsel self-assigned this Jan 12, 2018
@engineering-this
Copy link
Contributor

After research I've reported an upstream issue in Chromium issue tracker.

https://bugs.chromium.org/p/chromium/issues/detail?id=861673

Chrome is returning selection with 0 ranges when clicking outside of contenteditable, even when contenteditable still has focus.

I'm closing this issue as upstream.

@engineering-this engineering-this added the resolution:upstream Issue in the third-party software. label Jul 9, 2018
@mlewand mlewand removed this from the Backlog milestone Jul 9, 2018
@jswiderski
Copy link
Contributor

From what i have checked this problem occurs only in Chrome and only Win 10 and Linux. On Mac it works fine.

@jswiderski
Copy link
Contributor

jswiderski commented Aug 8, 2018

From what I have checked this problem occurs only in Chrome and only in Win 10 and Linux. On Mac it works fine.

During my tests I noticed that selection gets lost whenever user selects end of text e.g. in a paragraph and then clicks on body element margin either top, bottom or right (left for some reason worked fine). It was then enough to click on List button to get an error.

error

In order to work around this problem I have set min-height for body element so that it is bigger than the editor content area viewport. Please see the screen-cast - workaround.zip

@engineering-this engineering-this removed their assignment Aug 16, 2018
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. resolution:upstream Issue in the third-party software. status:confirmed An issue confirmed by the development team. type:bug A bug.
Projects
None yet
Development

No branches or pull requests

5 participants