Cursor initially fails to show upon clicking

In a .NET MVC project, using the Code Mirror library in JavaScript, I encountered the following issue:

.NET Framework version - 4.5
Code Mirror version - 5.63.1

1.Initially, clicking on the editor fails to display the blinking cursor, but when text is entered, the cursor appears.

  1. Below is the code for initializing CodeMirror:

  2. I attempted the following fix, but the issue persists:

I’m seeking assistance in resolving this issue.