Opened 3 years ago

Last modified 22 months ago

#14534 review Bug

Cannot read property 'blockLimit' of null

Reported by: Nick Owned by: Tade0
Priority: Normal Milestone:
Component: Core : Styles Version: 4.4.6
Keywords: Blink Webkit Support Cc:

Description

Steps to reproduce

  1. Open Source.
  2. Close Source.
  3. Open "Style"
  4. Open Source.
  5. Close Source.
  6. Open "Style" (Error should happen now)

You can also see the attached video.

Expected result

Not an error.

Actual result

On Chrome you get the following error:
ckeditor.js:439 Uncaught TypeError: Cannot read property 'blockLimit' of null

Other details (browser, OS, CKEditor version, installed plugins)

  • CKEditor Version: 4.5.7
  • Chrome Version: 49.0.2623.87

Duplicate: #13962 (I could not find a way to open it)

Attachments (1)

2016-03-17_15-54-51.mp4 (537.5 KB) - added by Nick 3 years ago.
Video of how to reproduce the issue

Download all attachments as: .zip

Change History (8)

Changed 3 years ago by Nick

Attachment: 2016-03-17_15-54-51.mp4 added

Video of how to reproduce the issue

comment:1 Changed 3 years ago by Jakub Ś

Keywords: Blink Webkit added
Status: newconfirmed
Version: 4.5.74.4.6

Problem can be reproduced in Blink and Webkit browsers from CKEditor 4.4.6.

NOTE: version is used to indicate when problem started occurring. Please don't change it.

comment:2 Changed 3 years ago by Tade0

Owner: set to Tade0
Status: confirmedassigned

comment:3 Changed 3 years ago by Tade0

Git bisect revealed, that this regression was introduced with git:3048943550530ba2f48b43ce48939184118b34dd.

comment:4 Changed 3 years ago by Tade0

One significant difference between normal operation and the bug is that at this line: https://github.com/ckeditor/ckeditor-dev/blob/ec85ab1687aa8ed1b892298c50db3ec4e36864d2/core/selection.js#L1483 cache.startElement is null, so it gets returned, which in turn causes problems along the way.

Another difference: Normally by the time onOpen is fired, the elements path is visible. This is not the case when the bug occurs. This is because the editor doesn't have focus at the time, which is due to the fact, that for some reason the editor.focusManager.hasFocus flag is (wrongly) truthy.

Last edited 3 years ago by Tade0 (previous) (diff)

comment:5 Changed 3 years ago by Tade0

Status: assignedreview

One solution would be to use the editable focus state instead of the editor's, since it more reliably tells whether the editor is in the desired state.

Added unit test. Changes pushed to branch:t/14534.

comment:6 Changed 2 years ago by Jakub Ś

We have also the same issue for IEs (including IE11 and Edge) starting from CKEditor 4.2. Please see: #12326

comment:7 Changed 22 months ago by Jakub Ś

Keywords: Support added
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy