Isaac Mann
Isaac Mann
Also, even if the `pageX/Y` events were supported, they'll position the context menu incorrectly. `pageX/Y` is relative to the document, `clientX/Y` is relative to the viewport.
Thanks for working on this. Cross browser/device testing is hard. I've avoided working on the mobile piece because it is so hard. My advice would be to find another library...
Here is the jQuery mobile [taphold event implementation](https://github.com/jquery/jquery-mobile/blob/master/js/events/touch.js#L69). And the custom events, `vclick` etc are defined [here](https://github.com/jquery/jquery-mobile/blob/e377564aa121d0439a21bc97f7854ee618c3f72d/js/vmouse.js#L322). It looks like they start a timer when `touchstart` happens and if it...
I think the Angular Material team is using HammerJS to handle longpress events. See the [tooltip docs](https://material.angular.io/components/tooltip/overview) and the [code](https://github.com/angular/material2/blob/master/src/lib/tooltip/tooltip.ts#L100). It looks like the `(longpress)` event is set up [here](https://github.com/angular/material2/blob/master/src/lib/core/gestures/gesture-config.ts)....
There are a couple ways you could do this: I'm assuming you have more than one `testObject` that you need to build a custom context menu for. 1. Build a...
So try modified option 2: ```html {{x.Name}} ``` ```ts onContextMenu(selected: any, event: MouseEvent) { this.selectedTestObject = selected; $event.preventDefault(); setTimeout(() => { this.contextMenuService.show.next({ event: $event, item: this.selectedTestObject, }); }); } ```
That's an interesting problem. I've never had to do that before. You could try doing this: ```html ``` ```ts @ViewChild(ContextMenuItemDirective) contextMenuItemDirectives: QueryList; createContextMenu(): any { if (!this.contextMenuItems || this.contextMenuItems.length ===...
You could try passing the TemplateRef down as an Input to whatever component needs it. I’m open to making a public ViewContainerRef, but I don’t want to change ContextMenuItems from...
It's hard for me to understand what you're trying to do without some code samples. Could you paste in the relevant bits of code?
Thanks, @utarwyn! Closing.