Opened 8 years ago

Closed 8 years ago

#14811 closed Bug (expired)

Reference to member of undefined object

Reported by: Alex-Dev Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

Steps to reproduce

  1. Use CKEditor

Expected result

not to crash

Actual result

Safari reports:

undefined is not an object (evaluating 'body.$.clientTop)

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

Code breaks under Safari on Mac OS.

In file: element.js

Function: getDocumentPosition: function( refDocument ) {

Line 1500

In the following code snippet, "body.$.clientTop" is evaluated, but "body" is undefined...

var clientTop = $docElem.clientTop
body.$.clientTop 0,
clientLeft = $docElem.clientLeft
body.$.clientLeft 0,

needAdjustScrollAndBorders = true;

I am using CKEditor version 4.5.10

Alexander

Change History (5)

comment:1 Changed 8 years ago by Alex-Dev

Note that the error tracking system changed the code that I entered (seems like an exceptionally bad idea).

There are logical OR connectors in the code; double vertical line. So the code is (the equivalent of):

var clientTop = $docElem.clientTop OR body.$.cleintTop OR 0

etc.

comment:2 Changed 8 years ago by Alex-Dev

CORRECTION: The subject of this ticket mentions "undefined"; that is not appropriate. In fact, "body" is an object with no properties. (Therefore, simple boolean test on "body" does not avert the problem.)

comment:3 Changed 8 years ago by Alex-Dev

SAME ISSUE occurs at line 1526.

comment:4 Changed 8 years ago by Jakub Ś

Status: newpending
Version: 4.5.10 (GitHub - master)

Please provide exact steps to reproduce this problem in CKEditor demo page or in standalone (not integrated into your application) CKEditor full/standard/basic package freshly downloaded from our page.

Such test will exclude possibility that some third-party script is causing this behaviour (by default CKEditor works in Safari Mac). Please also make sure that you haven't made any core code changes and that you are not using any third-party plugins not created by CKSource (custom plugins may be another source of the problem).

comment:5 Changed 8 years ago by Jakub Ś

Resolution: expired
Status: pendingclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy