In Visual studio (2022; v: 17.2.1) when I paste some text into a cshtml file, that same text seems to get copied, but then immediately deleted; including part of existing text. This only seems to happen when overwriting jquery code (anywhere within <script>
tags).
A very similar problem is already discussed here with no (usable) solution: https://developercommunity.visualstudio.com/t/when-i-copy-and-paste-what-i-paste-is-deleted-auto/367401
For example:
I have $('#tbSomeInputField1')
and I copy an ID from some other control (i.e "tbSomeOtherField2") and I use the mouse to select "tbSomeInputField1" from the code and I click paste. What is left is only $()
???
I'm experiencing this problem in the last couple of weeks so maybe it could be related to one of the latest VS updates...
What could be the problem?