enterprise-ng icon indicating copy to clipboard operation
enterprise-ng copied to clipboard

SohoContextMenu: positioning doesn't work for lazy-loaded context menu

Open dawiddrozdinfor opened this issue 1 year ago • 2 comments

Describe the bug When using lazy-load option on soho-context-menu, the context menu doesn't position next to mouse pointer. Instead it positions on the bottom of soho-context-menu. In the JQuery popup menu code for immediate trigger it expects eventObj as you can see below. image

This setting is not available to set by the angular wrapper api. It should either be exposed or set as part of initializeComponent().

To Reproduce Steps to reproduce the behavior:

  1. Go to context-menu-lazy-load.demo.html
  2. Change (click) to (contextmenu) event and preventDefault event
  3. Right click on the button
  4. See that context menu is opened under the button instead of next to the mouse pointer.

Expected behavior The context menu should be positioned next to mouse pointer.

Version

  • ids-enterprise-ng: 17.4.7

Additional context Team Infor WFM

dawiddrozdinfor avatar Apr 03 '24 10:04 dawiddrozdinfor

@dawiddrozdinfor not 100% sure im following these steps https://github.com/infor-design/enterprise/blob/main/app/views/components/contextmenu/test-dynamic-menu.html#L35 does seem to work just fine.

Can you modify the sample for the case? Whats the difference of what your trying to do with what currently works?

tmcconechy avatar Apr 03 '24 14:04 tmcconechy

@tmcconechy thanks for answering, I created example on stackblitz so you can reproduce. https://stackblitz.com/edit/ids-quick-start-1759-usa38a?file=src%2Fapp%2Fmy-example-component%2Fmy-example-component.component.html

Currently the context menu appears at the bottom of the component having soho-context-menu (my-input in the example above). Expected behavior is to have it appear next to the mouse pointer.

dawiddrozdinfor avatar Apr 03 '24 15:04 dawiddrozdinfor