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

Razor editor - adding await adds async keyword has erroneous behaviour #9942

Open
Tracked by #9807
vsfeedback opened this issue Feb 15, 2024 · 0 comments
Open
Tracked by #9807
Assignees
Labels
author: migration bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author

Comments

@vsfeedback
Copy link

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


[severity:It's more difficult to complete my work]

Current Behaviour

When writing async event handlers in .razor components, adding the await keyword in the method body triggers Intellisense to add the async keyword to the method declaration (which is excellent!) but has two bugs I've seen when doing this.

Sometimes after adding async, the editing cursor is left in the in the method declaration. This requires me to manually reposition the cursor back after the await. More frequently I continue to write the code in the wrong place, resulting in more work to undo and fix.

On other occasions the async is added correctly and the cursor is returned to the original line, but the await is now corrupted to read awaitwait.

Expected Behaviour:

In regular .cs files, a method with a Task return type, when await is added to the method body, the same operation adds async to the method declaration, and returns to the editing position after


Original Comments

Feedback Bot on 2/5/2024, 05:04 PM:

(private comment, text removed)

Feedback Bot on 2/8/2024, 02:41 PM:

(private comment, text removed)

Alex Gavrilov [MSFT] on 2/11/2024, 09:17 PM:

(private comment, text removed)


Original Solutions

(no solutions)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author: migration bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author
Projects
None yet
Development

No branches or pull requests

3 participants