Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

right mouse button event can't be used in "Microsoft Edge Tools for VS Code v2.1.4"'s internal browser window #1986

Open
McCmlIan opened this issue Feb 1, 2024 · 1 comment
Labels
bug Something isn't working tracked

Comments

@McCmlIan
Copy link

McCmlIan commented Feb 1, 2024

Environment (please complete the following information):

  • Windows 11:
  • Microsoft Edge Tools for VS Code v2.1.4

Describe the bug:
Javascript eventListener event of right mouse button can't be used in "Microsoft Edge Tools for VS Code v2.1.4"'s internal browser window

I tried to use the Click right mouse Button event in Javascrip but it cant be done in the Edge Dev tools for VS Code.
When logging mouse events in dev console it does display all events but the right mouse button.

Repro steps:
You may be able reproduce the bug of not being able to fetch right mouse button (Event Number 2) by running the following html code as an index.html file which is to be opened by right Clicking it in the Explorer of Visual studio for to run within the Dev Tools of Visual Studio Code

</head>
<body>

    <h1>RightMousbuttonRecognisationBug</h1>

    <canvas id="myCanvas" width="400" height="400" style="border:1px solid grey">
    </canvas>

    <script>
        const ctx = myCanvas.getContext("2d");
        console.log("Click?");
        myCanvas.addEventListener("mousedown",(event) =>{
        console.log(event.button);
        
        if (event.button == 2 ){ //right klick
                 console.log("RightClick");
            }
        });
    </script>
</body>

Expected behavior:
The Code above should display a "2" and "RightClick" on developer console when clicking the right mouse Button on the canvas element

Additional context:

The code works properly when running it on an outside Edge. ( "2" and "RightClick" gets displayed)

At least some elements than canvas don't trigger right mouse Click event either.

I could imagine that some kind of collision with the right mouse handling of VS Studio is happening.

Thank you so far, Microsoft Edge Tools for VS Code Improves my workflow but couldn't use it for some cases if this cant be fixed. :)

@captainbrosset
Copy link
Collaborator

Thanks a lot for filing and for providing the repro steps. I will make sure this bug is on our list.

@captainbrosset captainbrosset added bug Something isn't working tracked labels Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tracked
Projects
None yet
Development

No branches or pull requests

2 participants