Cannot type inside of HTML tags (.cshtml)

I'm having a difficult time describing this issue because it is so strange, and maybe I'm doing something wrong. For context, I'm using a MacBook Pro with M4 Pro Apple silicon. I've .NET 8.0.404 SDK installed, and I've built and ran a couple of applications with it to make sure that's working fine. and it is. And I'm using JetBrains Rider, with default settings and the default keymap.

I created a new solution and used the default Web → Razor Pages template. Added a new directory, and a new Razor page item, and I went into it to start writing a page, and I couldn't actually make any changes to the file. Typing didn't seem to do anything, but my keys were still working, as I could still use shortcuts to pull up quick search, actions, etc. I could use Command + X to cut lines, and such, and the file was not set to read-only. Clicking into other files of a different filetype, such as a controller.cs file allowed me to type into the files and just behaved like normal but only in those files. I thought maybe I had an issue with the formatting of cshtml files or something (I'm just guessing here). But going back to the cshtml files, I can add new lines and type normal, but I cannot type inside any element blocks

<div>I could not type anything in here</div>

I could not delete, use arrow keys, nothing. And it seems to be the case with all kinds of cshtml files. I tried creating them without templates, copying them from other projects, etc, and nothing else works. These files work like normal in other editors, and they work fine in other devices. Seemingly, at least.

I did some google searches to see if anyone else was experiencing the same issue, but I haven't searched too thoroughly admittedly, and I haven't found another post describing this, and I wonder if it's isolated to this hardware, or if I'm just missing some type of package or plugin to get it to work. 

To recap, I can type inside of the cshtml filetype, but the moment that a <div></div> block or any element block is added to the file, I can no longer work inside the file as normal.

0
4 comments

Hi Cesar

It seems like a known issue: RIDER-119978 CSS/USS files won't open without "JavaScript and TypeScript" plugin (the title might be confusing, but it also applies to razor files). The issue is already fixed for the next version of Rider. 

Please go to File | Settings | Plugins and check if JavaScript and TypeScript plugin is enabled. Enable it if it is not. 
 

2

Hey thanks for pointing this out! I enabled the plugin and my issue seems to be completely gone.

When you say “the next version Rider” are you referring to an upcoming version that isn't already out?

0

Yes, in the next version the JavaScript and TypeScript plugin will not be required to work with Razor views. 

The next 2024.3.1 version will be released in a couple of weeks. 

1

thanks, I had exactly the same issue, and enabling the plugin helped.

0

Please sign in to leave a comment.