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

Fix middle mouse button opening broken release notes link in browser #76487

Merged
merged 2 commits into from Aug 15, 2019

Conversation

@infmja
Copy link
Contributor

commented Jul 2, 2019

Fixes #76042

The middle mouse button now has the same effect as the left and right mouse button.
Clicking a link with the middle mouse button scrolls down to the clicked section instead of opening a broken link in the browser.

I tested this by temporarily changing the product version to 1.35 in package.json. Otherwise I was not able to open the release notes. I changed it back to 1.37 for this commit.

@mjbvz mjbvz self-assigned this Jul 3, 2019

@@ -443,7 +448,7 @@
});

// Bubble out link clicks
newFrame.contentWindow.addEventListener('click', handleInnerClick);
newFrame.contentWindow.addEventListener('mousedown', handleInnerClick);

This comment has been minimized.

Copy link
@diguifi

diguifi Jul 4, 2019

Why is this needed?

This comment has been minimized.

Copy link
@infmja

infmja Jul 4, 2019

Author Contributor

Because the click event only fires on left mouse button clicks. To prevent the middle mouse button from opening broken links in the browser, I needed to have an event that fires on middle clicks as well.

@diguifi
diguifi approved these changes Jul 5, 2019

@mjbvz mjbvz merged commit 15cf335 into microsoft:master Aug 15, 2019

1 of 2 checks passed

VS Code in progress
Details
license/cla All CLA requirements met.

@mjbvz mjbvz added this to the August 2019 milestone Aug 15, 2019

@mjbvz

This comment has been minimized.

Copy link
Contributor

commented Aug 15, 2019

Thanks! This will be in the next VS Code insiders build. We will see if it causes any problem for people using various input setups

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.