The following line is causing the error:
autocmd LocationChange .* js events.feedkeys("<Esc>",true)
when I switch pages. Typing js events.feedkeys("",true)
directly into the command line does not output any error messages. What am I doing wrong and how can I fix it?
This does not directly answer the question, but the behavior I was looking for was enabled by
set focuscontent