use codemirror setting instead of hack to focus