-
Notifications
You must be signed in to change notification settings - Fork 51
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
Context Menu in WebView2 PDF Viewer when selecting text #1345
Comments
Hey @VijayanRamachandran - thanks for the report. The settings typically require a navigation to take effect. If you reload the page or try navigating somewhere else first, do you still see this behavior? |
@champnic Ex: I tried as below in MainWindow.xaml.cs ( in addition to instead of setting Source in MainWindow.xaml to pdf )
|
I was able to repro the problem, and it looks like that menu shows up just by selecting text, not by using the right-mouse button. I don't think this is by design, so I've opened this bug on our backlog. Thanks! |
This should be fixed in runtimes 99.0.1112.0+. Thanks! |
Hello @champnic I have the same issue on a touchpanel where a webview2 element is used to display a pdf. When selecting text with the touch control I get the same context menu as shown from @VijayanRamachandran. If I select text using my mouse I dont get the context menu. MainWindow.xaml.cs namespace PDFViewer /// Interaction logic for MainWindow.xaml /// public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); InitializeAsync(); }
}` MainWindow.xaml Context menu that shows when selecting text with the touch control: |
@sergimos This is a pretty old issue. Can you open a new one for the issue you are seeing? |
UseCase:
In an sample WPF window application i hosted a single instance of WebView2 as below ( In MainWindow.xaml ) and passed source url to load a sample PDF.
In addition to that I added a settings to CoreWebView2 to disable default context menu as below ( In MainWindow.xaml.cs )
MainWindow.xaml
MainWindow.xaml.cs
Current Behavior:
Upon RMB click on selected text we could see context menu as shown in below screenshot.
Is this expected behavior ?
Version Information
Nuget - Microsoft.Web.WebView2 => 1.0.818.41
Fixed Version: Microsoft.WebView2.FixedVersionRuntime.91.0.864.37.x64
AB#33623058
The text was updated successfully, but these errors were encountered: