microsoft / microsoft/vscode-edge-devtools
right mouse button event can't be used in "Microsoft Edge Tools for VS Code v2.1.4"'s internal browser window
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 827
- Forks
- 358
- Avg merge
- 20h 32m
- Merged PRs (30d)
- 10
Description
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. :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the provided index.html canvas example in the Microsoft Edge Tools for VS Code internal browser, comparing it with external Edge. Trace the internal browser's right-click handling and verify that mousedown event.button 2 reaches the page console without breaking VS Code's own context-menu behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- developer-experience, frontend, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100