CodeMirror query input refocus bug
Created by: fkling
When a filter is highlighted (current filter), it's not possible to click the on the user menu. For some reason the query input gets re-focused again.
https://user-images.githubusercontent.com/179026/178546206-4dee6155-f83b-45e8-a103-7b5acdd5389c.mp4
This issue appeared after upgrading CodeMirror packages to 6.*
, so it seems likely that this is an issue with CodeMirror or how we are using it. Nevertheless we should look into how exactly the user menu removes focus from the input.
https://github.com/sourcegraph/sourcegraph/pull/38678 disables clearing the decoration as a temporary fix.
Update: It's also not possible to simply tab out of the input. As soon as one of the search query buttons is focused the focus jumps back to the query input. One more indication that this might be a CodeMirror issue.