Opened 10 years ago

Last modified 9 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.

  1. change your editor config (i.e. by changing config.js) to contain: config.readOnly = true;
  2. open any sample with CKEditor (i.e. samples/replacebyclass.html)
  3. 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() );
    } );
    
  4. 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:

  1. PK did already a quick tests and says that everything seems to be ok at Mac
  2. for me it seems that selection does not reposition itself in readonly mode or sth

Change History (3)

comment:1 Changed 10 years ago by Piotr Jasiun

Status: newconfirmed

I got clicked tag p instead of clicked tag a on Chrome 33 @ Ubuntu 12.04.

comment:2 Changed 10 years ago by Piotr Jasiun

And if click on the link before I click anything else I also get clicked tag h1.

comment:3 Changed 9 years ago by Elijah Lynn

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.

Version 0, edited 9 years ago by Elijah Lynn (next)
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