Git Product home page Git Product logo

Comments (34)

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024

Reported by gwt.team.jgw on 2006-11-16 15:32:34

  • Status changed: Accepted

from gwt.

dankurka avatar dankurka commented on July 21, 2024

Reported by gwt.team.bruce on 2007-01-23 21:21:08

  • Labels added: Category-UI

from gwt.

dankurka avatar dankurka commented on July 21, 2024
I vote for this bug!

Reported by m.zdila on 2007-06-14 13:24:58

from gwt.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024

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.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024

Reported by [email protected] on 2008-04-14 18:38:24

from gwt.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024
gabrieldavidguerrero,Thanks a lot for such a prompt response.   

Reported by suilongj on 2008-05-13 13:26:32

from gwt.

dankurka avatar dankurka commented on July 21, 2024
Is this still slated for 1.5?

Reported by dolcraith on 2008-06-09 15:00:38

from gwt.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024

Reported by [email protected] on 2008-06-12 13:51:29

from gwt.

dankurka avatar dankurka commented on July 21, 2024

Reported by [email protected] on 2008-06-17 12:25:23

  • Status changed: Started

from gwt.

dankurka avatar dankurka commented on July 21, 2024

Reported by [email protected] on 2008-06-17 13:54:55

  • Status changed: ReviewPending

from gwt.

dankurka avatar dankurka commented on July 21, 2024
Committed as r3086.

Reported by [email protected] on 2008-06-17 21:36:07

  • Status changed: FixedNotReleased

from gwt.

dankurka avatar dankurka commented on July 21, 2024
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.

dankurka avatar dankurka commented on July 21, 2024
1_5_RC2 has been released.

Reported by [email protected] on 2008-08-14 02:32:50

  • Status changed: Fixed

from gwt.

dankurka avatar dankurka commented on July 21, 2024
Issue 1632 has been merged into this issue.

Reported by [email protected] on 2009-04-15 00:16:50

from gwt.

dankurka avatar dankurka commented on July 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.