liferay / liferay-ckeditor

Other
8 stars 49 forks source link

fix: enable browser native menu in codemirror plugin #181

Closed fortunatomaldonado closed 3 years ago

fortunatomaldonado commented 3 years ago

When we switched to the codemirror plugin, right clicking in source mode no longer worked. By adding the cke_enable_context_menu CSS class to the codemirror plugin, the browser's native context menu is enabled.

See LPS-134687 Fixes #180

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

julien commented 3 years ago

@fortunatomaldonado I fetched this branch, made a debug build and tried in dxp but unfortunately I still don't see CKEDITOR's context menu in "source mode" - do you have any screenshots of this working? Thanks

fortunatomaldonado commented 3 years ago

Hello @julien,

Thank you for taking a look at this! I will make the updates.

I attached a video with the context menu appearing. Let me know what you think.

https://user-images.githubusercontent.com/31672551/123456583-dbd6d680-d597-11eb-8be8-6ee513a2f908.mp4

julien commented 3 years ago

@fortunatomaldonado When reading the ticket, I thought we wanted to show CKEditor's custom context menu, and not the browser's native context menu. After doing a build, I can see this working as we expect it to, and the code change seems reasonable to me, so I approve this pull request. Thanks!

[EDIT] I've edited the title and the message of this pull request before merging because we usually provide a description of the fix rather than an LPS/Jira ticket reference (which can be added in the commit message)

fortunatomaldonado commented 3 years ago

Hello @julien,

I apologize for not being clear in the ticket of the issue and I will try to be more clear moving forward. Thank you for the help with this!

julien commented 3 years ago

Hey @fortunatomaldonado, No problem at all - it's totally normal for these things to happen, you did great.