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

add_NewWindowRequested only handles window.open() #108

Closed
TcT2k opened this issue Jan 22, 2020 · 6 comments
Closed

add_NewWindowRequested only handles window.open() #108

TcT2k opened this issue Jan 22, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@TcT2k
Copy link

TcT2k commented Jan 22, 2020

Currently there is no way to detect (or deny) new windows requested by the user via: context menu, middle mouse button click or control+click.

I would expect the NewWindowRequested event to be triggered or at have another mechanism to detect and/or deny such actions.

@pagoe-msft pagoe-msft added the bug Something isn't working label Jan 23, 2020
@pagoe-msft
Copy link

Hi TcT2k,

Thanks so much for the feedback! We are aware of this and actively working on it. I'll circle back to this thread once we release a fix.

@douglas-jordan
Copy link

I reproduced this as well. I would also like to deny context menu new window/tab and possibly redirect to existing webview.

I tried to use the existing webview for the window open() content in the handler but the window open() content is never displayed.

Perhaps a webview setting that directs all window open(), new window/tab into the existing webview or something similar.

@pagoe-msft
Copy link

Hi @TcT2k,

We have resolved this issue in our latest SDK update:

https://review.docs.microsoft.com/en-us/microsoft-edge/hosting/webview2/releasenotes?branch=master#09488

@TcT2k
Copy link
Author

TcT2k commented Apr 20, 2020

@pagoe-msft
Thanks, I've confirmed that the event now triggers for new windows from the context menu, but it still does not trigger for middle mouse click or shift + mouse click.

Please reopen this issue until it is fixed or I could open a new issue if you prefer.

FYI the link you posted is not accessible publicly

@ajtruckle
Copy link

What about clicking hyperlinks in HTML where the target is _blank?

@ajtruckle
Copy link

#4187

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants