Opened 13 years ago

Closed 12 years ago

Last modified 9 years ago

#11 closed Bug (fixed)

Opera: No context menu

Reported by: Frederico Caldeira Knabben Owned by: Hallvord R. M. Steen (Opera Software)
Priority: Must have (possibly next milestone) Milestone: Opera Compatibility
Component: UI : Context Menu Version:
Keywords: Cc: Hallvord R. M. Steen (Opera Software)

Description

There is no context menu in Opera. This is due to their security restrictions. In any case, there should be another system to display the context menu (CTRL+Click for example).

Attachments (3)

Context tescase.htm (4.8 KB) - added by Alfonso Martínez de Lizarrondo 12 years ago.
testcase for our own contextmenu event
Context tescase.2.htm (4.3 KB) - added by Alfonso Martínez de Lizarrondo 12 years ago.
Updated testcase. The comments about Mac were due to a user js
OperaContextMenu.patch (3.1 KB) - added by Frederico Caldeira Knabben 12 years ago.
Proposal patch, based on Joao's idea (from Opera)

Download all attachments as: .zip

Change History (18)

comment:1 Changed 12 years ago by Hallvord R. M. Steen (Opera Software)

For certain other sites we have used a User JavaScript click-and-hold context menu script. It is currently active in browser.js for the Yahoo mail beta patch - if you use Y!Mail beta you can click-and-hold for context menus. You may want to see if you can re-use the idea or even the JS.

comment:2 Changed 12 years ago by Frederico Caldeira Knabben

Thanks for the info Hallvord. We can take a look on this.

In any case, do you think Opera will be working on this one? We are able to display the context menu with IE, FF and Safari. Only Opera is missing it.

comment:3 Changed 12 years ago by Hallvord R. M. Steen (Opera Software)

we really should support oncontextmenu but the required rewrites are apparently too large to do it soon. oncontextmenu support will not happen yet, sadly :-(

comment:4 Changed 12 years ago by Frederico Caldeira Knabben

Priority: NormalHigh

comment:5 Changed 12 years ago by Alfonso Martínez de Lizarrondo

Owner: set to Alfonso Martínez de Lizarrondo

I'm gonna try to do something with this. It won't be perfect but it seems possible to get it somehow working.

Changed 12 years ago by Alfonso Martínez de Lizarrondo

Attachment: Context tescase.htm added

testcase for our own contextmenu event

comment:6 Changed 12 years ago by Alfonso Martínez de Lizarrondo

The testcase is a mix of several things and for me it's able to cancel the default context menu and show a div replacing it. Tested in Mac and Windows.

Now it's time to apply this to the FCKeditor code...

comment:7 Changed 12 years ago by Alfonso Martínez de Lizarrondo

An initial patch has been applied in [680] it will still need more testing and allowing to show the normal context menu if the user wants to.

I won't be able to do more work for the moment, so if anyone wants to take a look at it feel free to do it.

Changed 12 years ago by Alfonso Martínez de Lizarrondo

Attachment: Context tescase.2.htm added

Updated testcase. The comments about Mac were due to a user js

comment:8 Changed 12 years ago by Frederico Caldeira Knabben

Alfonso, I've worked on a similar solution, based on Joao's idea (from Opera). I'm attaching my patch here. It considers the Ctrl settings and so on. It worked well with "_test/manual/fckcontextmenu/test1.html". For some reason the editor is not loading anymore in Opera for me, so I couldn't test it there.

The main difference is that I didn't really care of fixing Opera to support the contextmenu event as we don't need it, because we are forced in any case to use the mousedown and mouseup events. This makes the code a little bit smaller (even if I had to make a small code duplication there. I've also make the check, so if contextmenu will be someday supported by Opera, we'll simply use it.

Joao's proposal was a "generic" idea to fix Opera using user.js, to provide the contextmenu event to any need.

Let me know your thoughts on this.

Changed 12 years ago by Frederico Caldeira Knabben

Attachment: OperaContextMenu.patch added

Proposal patch, based on Joao's idea (from Opera)

comment:9 Changed 12 years ago by Alfonso Martínez de Lizarrondo

Hi Fred

I thought that you didn't have anything ready. The code is basically the same (they are based on the same source) with some minor differences, and I wanted to add the support for context menus in Opera so it can be properly tested (the floating panel calculations in Opera seems broken).

Your code seems slightly smaller as you have inlined some functions that are called only once, so we can do it that way.

The other part about this is provide a way to show our context menu if the browser doesn't allow us to hide its context menu, but that code should work also with Safari and Firefox. I think that we can do it almost the same way, but maybe a separate ticket would be better to find the proper combination of click + accelerator as it might vary dependending on platform and/or browser.

As I said in the previous comments now I won't be able to do too much here, so just pick up any solution that you prefer.

comment:10 Changed 12 years ago by Frederico Caldeira Knabben

Owner: changed from Alfonso Martínez de Lizarrondo to Frederico Caldeira Knabben

Ok Alfonso... I'll be closing this one soon.

I've opened #1078 to discuss other alternatives to fire the context menu.

comment:11 Changed 12 years ago by Frederico Caldeira Knabben

Cc: Hallvord R. M. Steen (Opera Software) added
Resolution: fixed
Status: newclosed

BTW Alfonso... your code helped me a lot to come with the final solution. And of course, thanks again to Joao.

Fixed with [683].

Click here for more info about our SVN system.

comment:12 Changed 12 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: closedreopened

The context menu is not being shown anymore with Opera build 9660.

comment:13 Changed 12 years ago by Hallvord R. M. Steen (Opera Software)

Owner: changed from Frederico Caldeira Knabben to Hallvord R. M. Steen (Opera Software)
Status: reopenednew

comment:14 Changed 12 years ago by Hallvord R. M. Steen (Opera Software)

Status: newassigned

some ongoing breakage: currently no event listeners inside designMode documents run - ever. Fixes pending.

comment:15 Changed 12 years ago by Alfonso Martínez de Lizarrondo

Resolution: fixed
Status: assignedclosed

The 9694 build has fixed the problem

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy