Hi Boris, first of all thanks for your help, as always fundamental. > Is your listener bubbling or capturing? If the former, are the sites > stopping propagation of the click event when they handle it?
err... I was bubbling. In fact, if I switch to capture mode, I see all the events. Now at least this part is clear. Some frameworks just consume the events. A precisation before going on: when calculating the coords where to synthesize my mousemove-mousedown-mouseup events, I was clicking in the MIDDLE (i.e. [(left+right)/2.0, (top+bottom)/2.0] of the DOMNodes areas. I even have some visual debug, so I actually draw a circle where I synthesize the events, and it looks OK. This worked... until this Facebook Search Button. so, I made some debugging, and I discovered a quite strange thing: by a painful trial-and-error debugging session, I discovered that the click event I am sending in the middle of it just "passes thru" and reaches the <HTML> ancestor node. Some more debugging showed that there is a 2x1 pixels "hotspot" where, if I synthesize the event, it is correctly dispatched to the search button (which is an <A> DOM node). The hotspot is, guess where? :) at the ORIGIN (left-top I mean) of the node. So I changed my code, and instead of "clicking" in the middle of the elements, I clicked on the origin.. and something else broke. Finally, I am now clicking at (left + 1, top + 1) and everything seems to work. > It might be worth trying to create a minimal (in terms of HTML/JS/CSS) > testcase for this. At that point it usually becomes clear what's going > on.... and if it doesn't, you should file a bug. Ahem... I don't know. Does this make sense to you and there is something I am missing, or it sounds like a bug to you? BTW, I am by no means a JS/CSS man, but if useful I can find someone to help me put up a testcase. While we are on it: I noticed that, apart from the click event, also a focus event is generated and sent. I was expecting it, in fact... but obviously (see Murphy's Law) there is a place where I NEED that focus, and where it is NOT generated. It is on the FaceBook "status box", which has an onfocus/onblur handler which shows and hides the "post" button. I need to explicitly generate and send a focus to this node (which is a <INPUT> node) via DispatchEvent to show the button; if not, just a click is sent.. and this time I am capturing, not bubbling, so I am sure no focus is sent. Why? If I synthesize on everything else, I see both a focus and a click in my listener... Thank you again, Aaron _______________________________________________ dev-embedding mailing list [email protected] https://lists.mozilla.org/listinfo/dev-embedding
