MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Problem/Bug]: WPF WebView2 does not accept Delete key when CommandBinding is in place

Open
#4,585 0 comments 0 reactions 1 assignee View on GitHub

@tochukwuIbeEkeocha is already working on this.

Since May 24, 2024.

bug
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

What happened?

If you have a CommandBinding in place for ApplicationCommands.Delete, and a webview2, the webview2 does not process any Delete keyboard keys, while all other UI elements do. This is keeping us from migrating to webview2. (EO Browser does not exhibit this behavior)

Importance

Blocking. My app's basic functions are not working due to this issue.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

1.0.2478.35

SDK Version

1.0.2478.35

Framework

WPF

Operating System

Windows 11

OS Version

22621.3447

Repro steps
  1. From a blank wpf project, add a commandbinding
  2. <CommandBinding Command="ApplicationCommands.Delete" Executed="CommandBinding_OnExecuted" CanExecute="CommandBinding_OnCanExecute"></CommandBinding>
  3. Add a webview2 with source of Google
  4. <wpf:WebView2 Source="https://www.google.com"></wpf:WebView2>
  5. Add a textbox
  6. <TextBox Width="200"></TextBox>
  7. run the program
  8. Type into google search
  9. select all text
  10. hit the delete key
  11. Expected: Text deletes
  12. Actual: nothing happens
  13. Go to the textbox
  14. type text into the text box
  15. select all
  16. Hit the delete key
  17. Actual: text is deleted
    GithubWebView2Issue.txt
Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Don't know

Last working version (if regression)

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.