[Project_owners] Display right-click context menu programmatically

Todd Long longfocus at gmail.com
Mon Jul 9 18:43:36 PDT 2007


On 7/9/07, Michael Vincent van Rantwijk, MultiZilla <
mv_van_rantwijk at yahoo.com> wrote:
>
>
> 0, 0?  have you tried to change it (because it must be in the browser
> area).
>
>
Yes, I've tried positioning it where the actual mouse-click takes place with
the same results. Thanks.


On 7/9/07, Neil < neil at parkwaycc.co.uk> wrote:
>
>
> The internal popup code does all sorts of other stuff before actually
> calling showPopup. In particular, it sets document.popupNode,
> document.popupRangeParent and document.popupRangeOffset, of which the
> latter two are apparently needed for spellchecking. Although you can set
> document.popupNode through script the other two are readonly so you
> appear to be out of luck.
>
>
Right, I was hoping there was some way to initialize the popupRange
properties. Perhaps I can initialize the spell checker interface within the
event so that it initializes those properties. I'll look into that but it
might require a native call. Thanks for the info.


On 7/9/07, Michael Vincent van Rantwijk, MultiZilla <mv_van_rantwijk at yahoo.com
> wrote:
>
>
> What? showPopup() can no longer be used from JS in Mozilla Firefox?  Or
> do you mean in this specific case; where someone wants to use
> showPopup() to open the context menu?
>
>
Just in the case where spell checker is involved (it appears).


On 7/9/07, Neil <neil at parkwaycc.co.uk> wrote:
>
>
> Yes, I believe the browser content area context menu that includes spell
> checking requires a "native" popup event.
>
>
Yeah, I think you're are right about the spell checker being the culprit.
Perhaps there is a way to invoke the spell checker interface from the event.


On 7/9/07, eric.jung at yahoo.com <eric.jung at yahoo.com > wrote:
>
>
> How about simulating a right-click mousedown/up event?
>
> http://developer.mozilla.org/en/docs/Code_snippets:Miscellaneous#Simulating_mouse_and_key_Events
>
>
Thanks for the link but unfortunately that code only applies to Firefox 3 /
Gecko 1.9. There just might not be a way to do it with the latest Firefox /
Gecko release but I'll look into coding for the future Gecko 1.9. Thanks
again.

If anyone else has any ideas they would be greatly appreciated. Thanks very
much for all the replies so far and info.

- TL

-- 
longfocus at gmail dot com
http://www.longfocus.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20070709/39dc5a07/attachment.html 


More information about the Project_owners mailing list