[CKEditor Dev] #13620: insertElement and insertHtml fail if widget is first in editor (Chrome)

207 views
Skip to first unread message

CKEditor

unread,
Aug 3, 2015, 10:17:34 PM8/3/15
to ckeditor...@googlegroups.com
#13620: insertElement and insertHtml fail if widget is first in editor (Chrome)
---------------------+---------------------
Reporter: brandonh | Owner:
Type: Bug | Status: new
Priority: Normal | Component: General
Version: 4.5.1 | Keywords:
---------------------+---------------------
== Steps to reproduce ==

(Simple demo attached)

1. In Chrome, load editor with only a widget in it (or at least have a
widget as first thing in the editor).
2. Without selecting an insert point in the editor, try using insertHtml
or insertElement.

== Expected result ==

The HTML should be inserted before the widget.

== Actual result ==

Fails with error "Uncaught TypeError: Cannot read property 'checkReadOnly'
of undefined"

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

Chrome 44.0.2403.125 | Windows 10/8.1 | CKE 4.5.1 | Plugins: Widget /
Enhanced Image (any plugin that uses widget will do)

--
Ticket URL: <http://dev.ckeditor.com/ticket/13620>
CKEditor <http://ckeditor.com/>
The text editor for the Internet

CKEditor

unread,
Aug 3, 2015, 10:18:34 PM8/3/15
to ckeditor...@googlegroups.com
#13620: insertElement and insertHtml fail if widget is first in editor (Chrome)
-----------------------+-------------------

Reporter: brandonh | Owner:
Type: Bug | Status: new
Priority: Normal | Milestone:
Component: General | Version: 4.5.1
Resolution: | Keywords:
-----------------------+-------------------
Changes (by brandonh):

* Attachment "cke-bug.zip" added.

Demo of Problem

CKEditor

unread,
Aug 30, 2016, 9:34:40 AM8/30/16
to ckeditor...@googlegroups.com
#13620: insertElement and insertHtml fail if widget is first in editor (Chrome)
-----------------------+-----------------------
Reporter: brandonh | Owner:
Type: Bug | Status: confirmed
Priority: Normal | Milestone:
Component: General | Version: 4.3
Resolution: | Keywords: Webkit
-----------------------+-----------------------
Changes (by j.swiderski):

* keywords: => Webkit
* status: new => confirmed
* version: 4.5.1 => 4.3


Old description:

> == Steps to reproduce ==
>
> (Simple demo attached)
>
> 1. In Chrome, load editor with only a widget in it (or at least have a
> widget as first thing in the editor).
> 2. Without selecting an insert point in the editor, try using insertHtml
> or insertElement.
>
> == Expected result ==
>
> The HTML should be inserted before the widget.
>
> == Actual result ==
>
> Fails with error "Uncaught TypeError: Cannot read property
> 'checkReadOnly' of undefined"
>
> == Other details (browser, OS, CKEditor version, installed plugins) ==
>
> Chrome 44.0.2403.125 | Windows 10/8.1 | CKE 4.5.1 | Plugins: Widget /
> Enhanced Image (any plugin that uses widget will do)

New description:

== Steps to reproduce ==

(Simple demo attached)

1. In Chrome, load editor with only a widget in it (or at least have a
widget as first thing in the editor).
2. Without selecting an insert point in the editor, try using insertHtml

or insertElement. You can also try inserting widget which uses
insertElement method - https://github.com/ckeditor/ckeditor-
dev/blob/master/plugins/widget/plugin.js#L420

== Expected result ==

The HTML should be inserted before the widget.

== Actual result ==

Fails with error "Uncaught TypeError: Cannot read property 'checkReadOnly'
of undefined"

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

Chrome 44.0.2403.125 | Windows 10/8.1 | CKE 4.5.1 | Plugins: Widget /
Enhanced Image (any plugin that uses widget will do)

--

Comment:

#14768 was marked as duplicate.

Problem can be reproduced from CKEditor 4.3.1 in Webkit browsers (both
Safari & Chrome). In version 4.3.0 error is {{{Cannot read property
'collapsed' of undefined}}}

--
Ticket URL: <http://dev.ckeditor.com/ticket/13620#comment:1>

CKEditor

unread,
Aug 30, 2016, 10:20:05 AM8/30/16
to ckeditor...@googlegroups.com
#13620: insertElement and insertHtml fail if widget is first in editor (Chrome)
-----------------------+-----------------------
Reporter: brandonh | Owner:

Type: Bug | Status: confirmed
Priority: Normal | Milestone:
Component: General | Version: 4.3
Resolution: | Keywords: Webkit
-----------------------+-----------------------

Comment (by j.swiderski):

Similar issues with 'checkReadOnly' can also be found in: #13314, #14809

--
Ticket URL: <http://dev.ckeditor.com/ticket/13620#comment:2>

Reply all
Reply to author
Forward
0 new messages