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

Issue: Unexpected Keyboard Behavior with WPF RichTextBox and Visual Studio #10142

Open
vsfeedback opened this issue Dec 4, 2024 · 2 comments
Labels
External Non-WPF Issue External issue, not caused by WPF

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It bothers me. A fix would be nice]
When working with a WPF application containing a RichTextBox control, we are experiencing a strange behavior involving keyboard input. If the user types text into the RichTextBox and then presses the backspace or delete key, the expected behavior is for the text in the RichTextBox to be deleted.

However, when a file is open and highlighted in Visual Studio behind the application window, pressing backspace or delete deletes text from the file in Visual Studio, rather than from the RichTextBox in the WPF application. This issue only occurs when the file in Visual Studio is focused, and the WPF window is in the foreground.

Steps to Reproduce:
Open a WPF application containing a RichTextBox.
Type text into the RichTextBox.
Open a file in Visual Studio and highlight some text in the file.
Click on the WPF window with the RichTextBox to focus it, and type text.
Press backspace or delete.
Observe that the text is deleted from the file in Visual Studio, not the RichTextBox in the WPF window.
Expected Behavior:
The backspace and delete keys should only affect the RichTextBox content in the WPF window, regardless of whether a file is open and highlighted in Visual Studio behind the window.

Environment:
Visual Studio Version: VS2019/VS2022
.NET Framework : 4.8


Original Comments

Feedback Bot on 11/19/2024, 01:26 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Ann Yang [MSFT] on 11/19/2024, 07:13 PM:

Thank you for your feedback!
Is this still stable to reproduce on the latest version 17.12.1 downloading from https://visualstudio.microsoft.com/downloads/?
If yes, could you attach a video of the issue you describe using [ScreenToGif] ( https://www.screentogif.com/) or a similar tool? A video can help us see the actions more directly.

We are looking forward to hearing from you soon.
Thanks

Rashmi H S on 11/19/2024, 09:02 PM:

(private comment, text removed)

Ann Yang [MSFT] on 11/19/2024, 11:05 PM:

Thanks for your reply, I used a blank WPF Framework project and target framework on 4.8, but this issue didn’t reproduce on myside, please see my screen recording.
RichTextBoxIssue.gif
please note, I worked in Microsoft Visual Studio Professional 2019 Version 16.11.42, Could you upgrade your VS and try again? is there a sample project for us to investigate this issue?

Rashmi H S on 11/20/2024, 10:11 PM:

(private comment, text removed)

Feedback Bot on 11/21/2024, 11:51 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Rashmi H S on 11/25/2024, 09:00 PM:

(private comment, text removed)

Rashmi H S on 12/2/2024, 00:35 AM:

(private comment, text removed)

@miloush
Copy link
Contributor

miloush commented Dec 4, 2024

I don't think this is a WPF issue, why was this moved here @chabiss? This is an issue in Visual Studio with focus, the editor would be a good place to start.

@himgoyalmicro himgoyalmicro added the External Non-WPF Issue External issue, not caused by WPF label Dec 6, 2024
@himgoyalmicro
Copy link
Contributor

We will check with Visual Studio team internally here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Non-WPF Issue External issue, not caused by WPF
Projects
None yet
Development

No branches or pull requests

3 participants