Opened 11 years ago

Last modified 9 years ago

#10127 confirmed Bug

[Opera] Error thrown when applying list on incorrectly focused editor

Reported by: Piotrek Koszuliński Owned by:
Priority: Normal Milestone:
Component: Core : Selection Version: 4.0 Beta
Keywords: Opera Cc:


  1. Open inlinebycode sample.
  2. Without focusing editor first, click inside editor area, but not near the text, so editor is focused, but cursor isn't blinking.
  3. Click list button.
  4. Error is thrown.
Uncaught exception: TypeError: Cannot convert 'path' to object

Error thrown at line 70, column 2 in <anonymous function: refresh>(editor, path) in http://localhost/cksource/ckeditor-dev/core/command.js:
    if ( this.context && !path.isContextFor( this.context ) )
called from line 416, column 3 in <anonymous function: exec>(editor) in http://localhost/cksource/ckeditor-dev/plugins/list/plugin.js:
    this.refresh(editor, editor.elementPath());
called via from line 52, column 2 in <anonymous function: exec>(data) in http://localhost/cksource/ckeditor-dev/core/command.js:
    return ( this, editor, data ) !== false );
called from line 531, column 5 in <anonymous function: execCommand>(commandName, data) in http://localhost/cksource/ckeditor-dev/core/editor.js:
    eventData.returnValue = command.exec(eventData.commandData);
called from line 79, column 4 in <anonymous function: click>(editor) in http://localhost/cksource/ckeditor-dev/plugins/button/plugin.js:
    editor.execCommand( definition.command );
called from line 135, column 5 in <anonymous function: execute>() in http://localhost/cksource/ckeditor-dev/plugins/button/plugin.js: editor );
called from line 182, column 4 in <anonymous function>() in http://localhost/cksource/ckeditor-dev/plugins/button/plugin.js:
called via Function.prototype.apply() from line 569, column 4 in <anonymous function: addFunction>() in http://localhost/cksource/ckeditor-dev/core/tools.js:
    return fn.apply(scope || this, arguments);
called via Function.prototype.apply() from line 595, column 3 in <anonymous function: callFunction>(ref) in http://localhost/cksource/ckeditor-dev/core/tools.js:
    return fn && fn.apply(window,, 1));
called from line 1, column 0 in <anonymous function>(event) in http://localhost/cksource/ckeditor-dev/samples/inlinebycode.html:, this);

Change History (6)

comment:1 Changed 11 years ago by Piotrek Koszuliński

Owner: set to Piotrek Koszuliński
Status: newassigned

comment:2 Changed 11 years ago by Piotrek Koszuliński

Milestone: CKEditor 4.0.2
Owner: Piotrek Koszuliński deleted
Status: assignedconfirmed
Version: 4.0.2 (GitHub - master)4.0 Beta

I wasn't right that this is regression after 4.0.1. I was able to reproduce this bug long before 4.0 Beta.

comment:3 Changed 11 years ago by Jakub Ś

Yes, I was just checking this.

Problem can be reproduced from CKEditor 4 beta in Opera only.

Weird thing is that on latest master I don't get this error in console. I'm able to get it in version but not in master. List isn't inserted so either this is correct behaviour and was fixed or error is simply being silently caught on latest master.

comment:4 Changed 11 years ago by Piotrek Koszuliński

Perhaps you've got the same problem as me with useless Opera's console. It doesn't switch with you when you change tab (I guess you were testing master on other tab than It stays on the old one, so you don't see that error has been thrown. I'm nearly sure of this because otherwise list button would work. Opera Dragonfly is the most ridiculous tool I've ever seen...

So after switching between tabs open "tabs" combo (3rd button from the right) and pick "select active window".

comment:5 Changed 11 years ago by Jakub Ś

Learning all the time:) Yes closing and reopening Opera Dragonfly proved that this error is thrown in master as well.

comment:6 Changed 9 years ago by Artur Delura

Another use case which throw this error (Chrome):

  1. Open image2 sample with following code:
    <figure class="image" style="float:left">
        <img alt="Saturn V" src="assets/image1.jpg" width="200" />
        <figcaption>Roll out of Saturn V on launch pad</figcaption>
  2. Click somewhere in the editor but not on image (to prevent focus it).
  3. Hit Enter

Result: There is an error in console: Uncaught TypeError: Cannot read property 'isContextFor' of null

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