fix: simultaneous opening of Pitch Pie Menu and Grey Menu on Right Click#4007
fix: simultaneous opening of Pitch Pie Menu and Grey Menu on Right Click#4007haroon10725 wants to merge 1 commit intosugarlabs:masterfrom
Conversation
|
Can you please link to the issue you are fixing? Does it describe how to reproduce the issue? |
|
Thanks. I don't have a Mac, so I cannot test it. I presume you did? |
|
@walterbender Yes, I did. I think you can also reproduce the same error by doing ctrl + click on a block. |
|
If you control-click on the background, you don't get the large menu. Is that OK? Long press works on a block, but not on the background. Is that OK? I think a better solution would be to determine where the click is occurring. |
|
No, I get large menu. |
|
Hmm. The only way I can get the large menu on my machine (Fedora) is a right-click. |
|
@walterbender Were you able to reproduce it ( ctrl + click on a block and both menu's appear ) ? |
|
I am pressing ctrl + click ( using touchpad ). Maybe try this. I have tested on Windows and Mac, works fine. |
|
There are 4 different mechanisms at play across 5 conditions: Mechanisms: Conditions: We want the following priority:
1 and 2 can co-exist. In the current implementation, sometimes multiple conditions are triggered. |
|
I couldn't fully understand what you say. |
|
Any progress on this? |
|
@walterbender I am identifying in the code where each of the events are being triggered. |
|
This pull request has been open for more than 60 days without any activity. It will be closed in 3 days unless the |
|
I am working on it, got busy due to my exams. |
|
@walterbender Should I close this PR? I couldn't test it as I have changed my OS. |
|
I think this is sorted out but there are still some separate issues with touch. |
@walterbender I will look at those. |
|
@haroon10725 Look at #4213 |


I found that this.container has both an on-click and a press-up event listener:
The on-click listener checks if the Ctrl key is pressed. If it is, it triggers the piemenuBlockContext function, which displays a grey menu. After this, the function returns, preventing any further code from executing.
The press-up listener calls the _mouseoutCallback function, but only if that.blocks.getLongPressStatus is false. This ultimately triggers the _changeLabels function without checking whether the Ctrl key is pressed or not.
@walterbender Can you please review it ?