liferay / liferay-ckeditor

Other
8 stars 49 forks source link

Source View right click not working #180

Closed fortunatomaldonado closed 3 years ago

fortunatomaldonado commented 3 years ago

Right click context menu does not work in Source View.

This behavior worked in "4.14.1-liferay.8" when sourcearea was used and stopped working on "4.14.1-liferay.9" when codemirror was used.

Reproduce:

  1. Using CKEditor click Source View.
  2. Try right clicking on the editor.

Result: No context menu pops up Expected: The context menu should appear.

Let me know if there are any questions or comments about this.

fortunatomaldonado commented 3 years ago

@julien, I found that adding cke_enable_context_menu will allow the editor to right click context menu. I am unsure where to create this change and wondering if the following code is a valid location to change and add the className?

https://github.com/ckeditor/ckeditor4/blob/cae20318d46745cc46c811da4e7d68b38ca32449/samples/toolbarconfigurator/lib/codemirror/codemirror.js#L145

Thank you in advance!

javiergamarra commented 3 years ago

Hi @fortunatomaldonado!

Julien is not the only one answering issues here now, no need to mention him directly, we'll read the issue anyway :)

Right now the squad lead by @markocikos is also taking care of the ckeditor :D

julien commented 3 years ago

Hi @fortunatomaldonado,

@nhpatt is right, everyone on the frontend infrastructure team gets these notifications ... but since I'm a nice guy I had a quick look.

Just so you know, the codemirror plugin we are using is one we developed, which you can find here. I also tested adding the cke_enable_context_menu CSS class to the CodeMirror-code div element, but in my case I didn't see any change, but let me know if you're able to make it work.

fortunatomaldonado commented 3 years ago

@nhpatt thank you for the information, truly appreciate it!

@julien, thanks for taking the time to do so. I am still working on the correct solution and hope to get a pull on this ticket soon.

Thank you all again!

julien commented 3 years ago

@fortunatomaldonado no problem