Comments (34)
The general consensus seems to be that this would be useful in some circumstances. It
would be pretty easy to implement using a simple popup menu and a global event hook.
Reported by joelgwebber
on 2006-11-16 15:31:48
from gwt.
Reported by gwt.team.jgw
on 2006-11-16 15:32:34
- Status changed:
Accepted
from gwt.
Reported by gwt.team.bruce
on 2007-01-23 21:21:08
- Labels added: Category-UI
from gwt.
I vote for this bug!
Reported by m.zdila
on 2007-06-14 13:24:58
from gwt.
This would be great to have. For some reason I'm having problems with it working in
IE correctly, but in consistent in FF trying to implement the hooks with the context
menu, and the right click. I don't want to global hook, I want the right click to
be different on various objects. So it might be nice to have some constructors that
take in the menu for the item.
Reported by sideview1
on 2007-06-25 17:45:08
from gwt.
Yeah, I hope this can be released very soon, it would be very helpful.
Thanks
Reported by jdanni
on 2007-08-07 00:41:29
from gwt.
A stand alone context menu class would have been nice, but I've already written it.
I'd be happy to submit the code for GWT.
However, getting it to work in Opera WOULD be nice, and a definite improvement over
the current situation. But it needs to be something that changes every time the user
right-clicks (that's why it's called a "contextual" menu: its elements depend on the
context of the click).
Reported by gregtd
on 2007-08-20 20:25:09
from gwt.
Reported by gwt.team.jgw
on 2007-10-01 17:26:43
- Labels added: Priority-Medium, Milestone-1_5_RC
- Labels removed: Priority-Low
from gwt.
Hi all, I implemented this functionality by adding code to the gwt that will allow
you to sink the onmenucontext event just as any other event, the code is very simple
is almost a copy an paste of the way you do it for the rest of the events so is
nothing weird, I tested it in FF 2, IE7,Safari and Opera 9.23 it worked well on all
except for Opera, but is because Opera still doesn't support the oncontextmenu I
tested with a simple handmade js code that showed an alert when the oncontextmenu was
triggered, it worked on all browsers except for opera. I looked in other libraries
like the YUI, and for opera they enable the popup with Ctrl +left-click . To achieve
the same in GWT a developer will simply have to sink the oncontextmenu event plus the
onmousedown and active the popup when either the context menu or a left-click + ctrl
event is triggered.
If you want I could attach a SVN patch of the version 1.4 with my changes
Cheers
Gabriel
Reported by gabrieldavidguerrero
on 2007-10-01 20:22:01
from gwt.
I attached the svn patch that adds the oncontextmenu event to the gwt for the
realease version of gwt 1.4 , I also attached a zip with an example of a popup menu
that runs on all browsers (on opera using ctrl+left-click) , to easily run the
example i added the compiled version of the example inside the zip, I could attach
the gwt-user.jar with the patch applyed if anyone needs it
Cheers
Gabriel
Reported by gabrieldavidguerrero
on 2007-10-10 10:51:04
- _Attachment: [gwt1.4SrcPatch.txt](https://storage.googleapis.com/google-code-attachments/google-web-toolkit/issue-24/comment-10/gwt1.4SrcPatch.txt)_ - _Attachment: [ContextMenu.zip](https://storage.googleapis.com/google-code-attachments/google-web-toolkit/issue-24/comment-10/ContextMenu.zip)_
from gwt.
I haven't looked at these patches yet, but I'm +1 on simply making the context menu
event sinkable.
Reported by gwt.team.jgw
on 2007-10-25 13:48:33
from gwt.
I download the GWT1.4.60, but don't find the changes. There is no ONCONTEXTMENU
event supported in com.google.gwt.user.client.Event class. I'm not sure whether the
feature will be added in the future GWT release. Gabriel, could you attach the gwt-
user.jar with the patch here, or send to me please? My email address is:
[email protected] .Thanks a lot.
Reported by wsxiaozhang
on 2008-01-11 07:07:56
from gwt.
Hi wsxiaozhang, the feature is not available on the 1.4.6, if the gwt team approves
it then it will be added it to the next version of gwt, for now I attached the the
gwt-user.jar that I'm using
Cheers
Reported by gabrieldavidguerrero
on 2008-01-11 10:36:44
- _Attachment: [gwt-user.jar](https://storage.googleapis.com/google-code-attachments/google-web-toolkit/issue-24/comment-14/gwt-user.jar)_
from gwt.
Hi I'm working with the trunk now, so I made a patch with the changes to sink the
contextmenu event to the trunk in case your are interested
Reported by gabrieldavidguerrero
on 2008-01-28 13:35:15
- _Attachment: [contextMenuPatch.txt](https://storage.googleapis.com/google-code-attachments/google-web-toolkit/issue-24/comment-15/contextMenuPatch.txt)_
from gwt.
We will include this in the 1.6 release so we can spend a little extra time on it.
Reported by gwt.team.jlabanca
on 2008-02-28 19:17:30
- Labels removed: Milestone-1_5_RC
from gwt.
jgw wants to revisit for GWT 1.5 after all.
Reported by [email protected]
on 2008-04-08 15:08:14
- Labels added: Milestone-1_5_RC
from gwt.
excellent i will create a pacth for gwt 1.5 that use the new event system
Reported by gabrieldavidguerrero
on 2008-04-08 15:18:30
from gwt.
Reported by [email protected]
on 2008-04-14 18:38:24
from gwt.
Hi I finished a patch for the trunk to enable the sink of the contextmenu method
again i simply enable it by using code similar to how the rest of the events are
sinked, i have attached a patch (gwt1.5contextMenu.txt) and a zip file
contextMenu.zip which contains the gwt-user.jar with the modifications (if you want
to test it just replace it on your gwt home), also in the samples folder you will
find a very simple sample of how to use it , i tried on the latest firefox,IE and
safari and works fine, if you want to compile the example drag the ContextMenu folder
and drop it in the samples folder of your gwt home and replace the gwt-user jar,
although the example is precompiled so if you just want to test it just execute the
/samples/ContextMenu/www/com.google.gwt.sample.contextMenu.ContextMenu/ContextMenu.html
Reported by gabrieldavidguerrero
on 2008-04-18 11:36:14
- _Attachment: [gwt1.5contextMenu.txt](https://storage.googleapis.com/google-code-attachments/google-web-toolkit/issue-24/comment-20/gwt1.5contextMenu.txt)_ - _Attachment: [contextMenu.zip](https://storage.googleapis.com/google-code-attachments/google-web-toolkit/issue-24/comment-20/contextMenu.zip)_
from gwt.
when i tried to replace gwt1.4 user.jar with this1.5 one, I got such an error in
compilation:
Loading inherited module 'com.google.gwt.emul.Emulation'
Module location:
jar:file:/C:/Programs/gwt-windows-1.4.61/gwt-user.jar!/com/google/gwt/emul/Emulation.gwt.xml
[ERROR] Line 23: Unexpected element 'define-linker'
[ERROR] Failure while parsing XML
Not sure why this happened. due to this error, the context menu does not work.
Appreciate any suggestions.
Suilong
Reported by suilongj
on 2008-05-12 14:48:45
from gwt.
you cant replace gwt-user.jar of the 1.5 in a 1.4 , you'll need to download a the gwt
1.5 milestone unzip it and then replace the gwt-user.jar
Reported by gabrieldavidguerrero
on 2008-05-12 14:53:51
from gwt.
in the comment 14 there is a gwt-user.jar for the 1.4.6
Reported by gabrieldavidguerrero
on 2008-05-12 14:56:46
from gwt.
gabrieldavidguerrero,Thanks a lot for such a prompt response.
Reported by suilongj
on 2008-05-13 13:26:32
from gwt.
Is this still slated for 1.5?
Reported by dolcraith
on 2008-06-09 15:00:38
from gwt.
Yes, I'm going to take care of it this week.
Reported by [email protected]
on 2008-06-09 19:38:42
- Labels added: Milestone-1_5_RC2
- Labels removed: Milestone-1_5_RC
from gwt.
Hi, here is a patch with my changes to enable the sinking of the oncontextmenu for
the lasted code in the trunk, in case you guys want to do it that way, the only issue
that I have with this implementation is that it works on all browsers except for
opera because they don't support the oncontextmenu and I'm not sure if they ever
will, they seem to be against that, to solve this I normaly use another event in
opera to trigger the menu like control + click
Cheers
Gabriel
Reported by gabrieldavidguerrero
on 2008-06-12 09:38:43
- _Attachment: [gwt1.5.RC1contextMenu.txt](https://storage.googleapis.com/google-code-attachments/google-web-toolkit/issue-24/comment-28/gwt1.5.RC1contextMenu.txt)_
from gwt.
Reported by [email protected]
on 2008-06-12 13:51:29
from gwt.
Reported by [email protected]
on 2008-06-17 12:25:23
- Status changed:
Started
from gwt.
Reported by [email protected]
on 2008-06-17 13:54:55
- Status changed:
ReviewPending
from gwt.
Committed as r3086.
Reported by [email protected]
on 2008-06-17 21:36:07
- Status changed:
FixedNotReleased
from gwt.
it will also be nice having a standalone PopupMenu widget which accepts MenuItems and
separators as children.
Reported by hakan.eryargi
on 2008-08-02 15:11:52
from gwt.
1_5_RC2 has been released.
Reported by [email protected]
on 2008-08-14 02:32:50
- Status changed:
Fixed
from gwt.
Issue 1632 has been merged into this issue.
Reported by [email protected]
on 2009-04-15 00:16:50
from gwt.
Reported by [email protected]
on 2011-02-09 00:21:14
- Labels added: Milestone-1_5-RC2
- Labels removed: Milestone-1_5_RC2
from gwt.
Related Issues (20)
- Update copyright entries, style check to reference GWT Project Authors
- Allow listening for request cancelation and possibly completion HOT 2
- Bound mismatch compilation error HOT 1
- Java 11 JRE emulation HOT 1
- Plan for a new official release - oficial maven dependency HOT 2
- 2.10 artifacts on maven repositories seem to be broken. HOT 2
- Abnormal memory consumption during serialization HOT 4
- The GWT compiler reports a non-existent error near "delete" keyword HOT 2
- Compiler hangs instead of reporting an error if infinitely recursive function is called HOT 5
- GWT compatibility issue with jetty version 9.4.9 HOT 2
- Jakarta Validation Support HOT 3
- GWT Compatibility issue with OPEN LIBERTY HOT 1
- Collections.singleton(...) is not Serializable HOT 7
- GWT snapshot builds cannot be used in Java 8 HOT 1
- Java 21 cause StackOverFlowException in TypeUtils#resolveGenerics due to List implementing SequencedCollection with new function getFirst() being treated as a getter HOT 4
- Update Eclipse .classpath files to account for newer libraries HOT 3
- Provide system property gwt.codeserver.host for server side GWT-RPC HOT 5
- Update ErrorProne to support building (and testing) GWT on Java 21 HOT 4
- Proposal: Deprecate DevMode usage without -noserver HOT 13
- Feature request: Make GWT ePub friendly HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwt.