I too could use some general advice on how to debug event-related problems, including DOM events.
You might find some of the responses in this other thread useful - the question I posed there is different, but closely related. Essentially, though, the message I took away was to avoid manipulating the DOM directly with anything involving events. One of the responses points to a page that describes some of the event/DOM/browser issues of relevance. http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/8e2b6a5d754a8604/216714fdfb8e8e12 On Apr 24, 10:02 am, Darkflame <darkfl...@gmail.com> wrote: > Anyone? I'm still having trouble working out what widgets grabbing my > clicks. > > Not sure if Ben's having the same trouble as me, but there must be > some method to work it out no? (using Firebug, debuging > code...anything?). > > On Apr 21, 7:00 am, Ben FS <ben.su...@gmail.com> wrote: > > > > > Update: I'm using a NativePreviewHandler to get a sense of what is > > going on ... but can't seem to get much useful information. > > > Event.addNativePreviewHandler(new NativePreviewHandler() { > > @Override > > public void onPreviewNativeEvent(NativePreviewEvent event) { > > NativeEvent ne = event.getNativeEvent(); > > if ( ne != null && ne.getButton() == ne.BUTTON_LEFT ) { > > GWT.log(ne.getType(), null); > > } > > } > > }); > > > This logs twice when I left-click: mouseup then mousedown > > > I'd really like to figure out why my Widget's ClickHandler is not > > getting called, but don't know how to go about investigating (or > > fixing this). Any advice? > > > On Apr 20, 5:13 pm, Ben FS <ben.su...@gmail.com> wrote: > > > > I too would like to know how to debug event-related problems? > > > > In my case, I dynamically insert an Element into a TreeItem, via DOM > > > manipulation, in order to display an editing control for the selected > > > tree node. This worked well using GWT 1.4.62, but no longer works > > > using GWT 1.6.4. It looks like the tree nodes are represented by a > > > different DOM/HTML structure in the new version, so I made changes to > > > accomodate this (somewhat). But a serious problem remains: no > > > ClickEvents are registered on the Element that I insert into the DOM. > > > > I've tried to debug this by inserting an HTML element explicitly set > > > to have a hyperlink with a javascript href value to pop up an alert > > > box. The link appears, and on mouseover the browser status bar shows > > > javascript:alert(), but on click nothing happens. > > > > Any tips for how to debug such a situation? > > > > Any tips for how to insert Elements via DOM manipulations and still > > > have them participate in event handling, i.e. click events? > > > > Thanks! > > > > On Apr 20, 5:58 am, darkflame <darkfl...@gmail.com> wrote: > > > > > I got a widget with a set of hyperlinks on it thats appearing ontop of > > > > other page elements. > > > > > None of the links seem to be firing when clicked, so I suspect > > > > something else is grabbing them. (specifically a modified dialogue > > > > box...but I don't know what element in the box is doing it) > > > > > I'm not too good with Dom stuff, but I tried inserting a; > > > > > GWT.log(DOM.getCaptureElement().toString(),null); > > > > > Where the handlers are being assigned, but it just returns null. > > > > (probably on the wrong line of thinking altogether, but that was the > > > > only thing I could spot to try).- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---