update inner mode detection for codemirror v3
Merge pull request #3073 from adobe/randy/cmv3-code-fix-2

Update inner mode detection for codemirror v3