Opened 11 years ago
Last modified 10 years ago
#11842 confirmed Bug
Invalid element given in a parameter for contextMenu.addListener listener.
Reported by: | Marek Lewandowski | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
There seems to be an issue with context menu in readonly mode. It does not pass correct argument to funciton registered with editor.contextMenu.addListener()
(see reference) on right click. Elements path seems to be invalid as well.
Issue might be OS dependent - tested with FF28, Chrome, IE8 all @Win7.
- change your editor config (i.e. by changing config.js) to contain:
config.readOnly = true;
- open any sample with CKEditor (i.e. samples/replacebyclass.html)
- execute following code in order to register a simple listener:
CKEDITOR.instances.editor1.contextMenu.addListener( function( el, sel ) { console.log( 'clicked tag ', el && el.getName() ); } );
- right click directly on any link inside the editor
Expected result:
Editor should log something like:
clicked tag a
Current result:
It uses totally different tag, and output is like:
clicked tag h1
FF28@Win7 gives even a body as a parameter.
additional info:
- PK did already a quick tests and says that everything seems to be ok at Mac
- for me it seems that selection does not reposition itself in readonly mode or sth
Change History (3)
comment:1 Changed 11 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 11 years ago by
And if click on the link before I click anything else I also get clicked tag h1
.
comment:3 Changed 10 years ago by
Confirmed, we are getting this too. Our issue is any browser on Mac OS. Mac OS is returning the element one level too deep. Windows and Linux return the expected element level. I will post more info when I find it. Very difficult as our CMS doesn't have unminified CKEditor easily toggleable.
Update: We are using 4.4.1.
I got
clicked tag p
instead ofclicked tag a
on Chrome 33 @ Ubuntu 12.04.