hoffstadt / hoffstadt/DearPyGui
Right-clicking context menu that appears when you right-click legend causes modal window to close without warning
- Dominant language
- C++
- Stars
- 15.6k
- Forks
- 783
- PR merge metrics
- No merged PRs in 30d
Description
If I have a plot in a modal window, and if I right-click the legend in a certain way it causes the modal window to close without warning or any error messages.
I think I've worked out the exact sequence of clicks that causes the bug. If you right-click the legend once, then right-click the empty context menu that appears (but specifically at a location that overlaps with the legend underneath) then right-click anywhere else in the viewport (that isn't the context menu), the modal window will close without warning.

**Code**
```python
import dearpygui.dearpygui as dpg
dpg.create_context()
def show_plot():
with dpg.window(modal=True):
with dpg.plot():
dpg.add_plot_legend()
dpg.add_plot_axis(dpg.mvXAxis)
dpg.add_plot_axis(dpg.mvYAxis)
dpg.add_line_series([0, 1], [0, 1], parent=dpg.last_item(), label="line1")
with dpg.window():
dpg.add_button(label="Show Plot", callback=show_plot)
dpg.create_viewport(width=800, height=600)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
```
DearPyGui version 1.6.2, Python 3.10.0, Windows 10
Contributor guide
Assessment
This issue has not been assessed yet.