Opened 12 years ago
Last modified 11 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: |
Description
- Open inlinebycode sample.
- Without focusing editor first, click inside editor area, but not near the text, so editor is focused, but cursor isn't blinking.
- Click list button.
- 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 Function.prototype.call() from line 52, column 2 in <anonymous function: exec>(data) in http://localhost/cksource/ckeditor-dev/core/command.js: return ( commandDefinition.exec.call( 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: this.button.click( editor ); called from line 182, column 4 in <anonymous function>() in http://localhost/cksource/ckeditor-dev/plugins/button/plugin.js: instance.execute(); 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, Array.prototype.slice.call(arguments, 1)); called from line 1, column 0 in <anonymous function>(event) in http://localhost/cksource/ckeditor-dev/samples/inlinebycode.html: CKEDITOR.tools.callFunction(121, this);
Change History (6)
comment:1 Changed 12 years ago by
Owner: | set to Piotrek Koszuliński |
---|---|
Status: | new → assigned |
comment:2 Changed 12 years ago by
Milestone: | CKEditor 4.0.2 |
---|---|
Owner: | Piotrek Koszuliński deleted |
Status: | assigned → confirmed |
Version: | 4.0.2 (GitHub - master) → 4.0 Beta |
comment:3 Changed 12 years ago by
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 4.0.1.1 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 12 years ago by
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 4.0.1.1). 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 12 years ago by
Learning all the time:) Yes closing and reopening Opera Dragonfly proved that this error is thrown in master as well.
comment:6 Changed 11 years ago by
Another use case which throw this error (Chrome):
- 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> </figure>
- Click somewhere in the editor but not on image (to prevent focus it).
- Hit
Enter
Result:
There is an error in console:
Uncaught TypeError: Cannot read property 'isContextFor' of null
https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/enterkey/plugin.js#L502
I wasn't right that this is regression after 4.0.1. I was able to reproduce this bug long before 4.0 Beta.