Context menu does not close on click inside scheduler, when 'timeRangeSelectedHandling' is set
Asked by Daniel L. 5 years ago.
Hey there =)
an unexpected behaviour occured while I was developing. Is the following a bug? Is there a way to fix it?
Problem description:
Via rightclick (+ also optional DayPilot.Areas), I can open a context menu which contains different settings.
When a setting is selected, the corresponding event fires, the context menu closes etc. This is wanted behaviour.
But when I open the context menu and decide that I want to close it right away (for example no setting fits my criteria), I can not close it by just clicking into empty space inside the scheduler. I have to click into empty spaces/on elements outside the scheduler on the website.
This only happens when the setting "timeRangeSelectedHandling" of the scheduler is set to "disabled".
Hi Dan,
the fix doesn`t work for us, because we`re showing the context menu manually with the show()-function and the onEventRightClick-Event. Is there a suitable event for hiding the context menu manually, by clicking in empty space of the scheduler?
You can see the problem in this codepen: https://codepen.io/TORISO/pen/GRNYqWL
Comment posted by Dan Letecky [DayPilot] 5 years ago.
Hi Tim,
You'll need to link the menu to the event (and to the Scheduler) by passing the event object to the show() method: