Opened 10 years ago

Closed 10 years ago

#16935 closed Bug (fixed)

[Chrome] Source mode in one editor raises error while focusing other editor

Reported by: Tomasz Jakut Owned by: Tomasz Jakut
Priority: Normal Milestone: CKEditor 4.7.0
Component: General Version: 4.6.2
Keywords: Cc:

Description

Steps to reproduce

  1. Open ​https://jsfiddle.net/Comandeer/6333p40t/
  2. Open console.
  3. Click inside the first editor to focus it..
  4. Switch the first editor to source mode.
  5. Click inside the second editor to focus it.

Expected result

Second editor is focused.

Actual result

Second editor is focused, but at the same time error is thrown into console:

Uncaught TypeError: Cannot read property '$' of undefined

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

It seems that error is connected with the fix for #13446.

Change History (7)

comment:1 Changed 10 years ago by Tomasz Jakut

Status: new → confirmed

comment:2 Changed 10 years ago by Marek Lewandowski

It might be related to #16825. Please see if reverting commit: ​https://github.com/ckeditor/ckeditor-dev/commit/2c0d9802bd809bb3c28c86ea8ff911f351d6ae18 fixes the problem.

comment:3 Changed 10 years ago by Tomasz Jakut

The case could be even simplified:

  1. Open ​https://jsfiddle.net/Comandeer/L82fagkp/
  2. Click inside editor.
  3. Click the button

Error is thrown. Seems that blurring editor in source mode causes the issue.

comment:4 Changed 10 years ago by Tomasz Jakut

Owner: set to Tomasz Jakut
Status: confirmed → assigned

comment:5 Changed 10 years ago by Tomasz Jakut

Status: assigned → review

Reverting the change fixed the issue.

The issue is connected with the fact that editor.editable().isInline() always return true when classic editor is switched to source mode. Checking editor.elementMode on the other hand always refers to the WYSIWYG's mode editable.

I've added manual and unit tests. Pushed ​branch:t/16935.

comment:6 Changed 10 years ago by kkrzton

Status: review → review_passed

LGTM!

comment:7 Changed 10 years ago by kkrzton

Resolution: → fixed
Status: review_passed → closed

Fixed with ​e1bf2df.

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