Investigate "invalid position" bug
Created by: fkling
This is a bit vague, but at least two people have encountered an issue with the CodeMirror implementation where it threw error about the cursor position being not valid for the current document. It's currently unclear what the source of the error is, so more investigation is necessary.
Update 2022-05-18: It looks like I can reliably replicate this issue by hovering over some part of the input so that the a popover with more information appears and then delete the content that the hover relates to.
Demo:
https://user-images.githubusercontent.com/179026/169274263-80ab3ae2-da97-40f6-b17f-30865c87b762.mp4
While there are some content issues with the hover tooltip, further investigation revealed that the problem is with our custom "hovered token highlighting". The way it's currently implemented that extension holds onto a token that doesn't exist anymore and therefore trying to decorate something outside the range of the document. I'm preparing a fix for this.
It's also pretty obvious that something is wrong with the highlighting when adding new input before the highlighted token:
https://user-images.githubusercontent.com/179026/169291377-3fc843c8-98b9-41ef-a89b-5ea20503bc3a.mp4
Update 2022-05-19: FWIW, on https://sourcegraph.com we seem to catch the error and show it to the user (albeit making the interface unusable). On https://sourcegraph.com/search the error is visible in the console and the input will behave unpredictable.