Hey Marcus ,

If you want to trigger the copy paste menu manually, there is an
alternative way to do so. Please reference message app[1] that we use
selection API to trigger the menu because there is no user interaction
could trigger the menu in some scenario in message app. If you want to know
more about the copy paste behavior, maybe you can ask Ting-Yu (
[email protected]) for more details.

Steve.

[1]
https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/views/conversation/js/conversation.js#L3115



On Wed, Sep 9, 2015 at 12:42 PM, Marcus Cavanaugh <[email protected]> wrote:

> Is it possible to trigger the copy/paste context menu from the System app
> by passing touch events to HTMLIFrameElement.sendTouchEvent
> <https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/sendTouchEvent>
> ?
>
> Sending 'touchstart' and/or 'mousedown' events does not trigger the menu;
> it seems `sendTouchEvent` doesn't produce any meaningful selection events
> otherwise. (Our marionette tests are able to produce this context menu, but
> I presume that's through a different codepath.) I'm admittedly unfamiliar
> with how input events flow through Gecko to produce this menu, and my
> dxr-fu isn't great.
>
> Additional context: I'd like to intercept touch events (which works) and
> pass them onto the appropriate element/iframe (which works, in general),
> but I haven't been able to figure out how to forward the long-press gesture
> that triggers the copy/paste menu. This is relevant for the incoming native 
> utility
> tray enhancements <https://bugzilla.mozilla.org/show_bug.cgi?id=1178162>.
>
> Any pointers or tips would be appreciated. Based on what I've seen so far,
> it appears that this isn't possible as-is.
>
>
> Marcus
>
>
>
>
> _______________________________________________
> dev-fxos mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-fxos
>
>
_______________________________________________
dev-fxos mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-fxos

Reply via email to