Regain focus after mousedown


Hey, so in my package I catch mousedown event with preempt and in the function I’m calling event.stopPropagation(). The problem is, that editor looks like it lost focus. Calling any mix of .focus() didn’t help me.

Weird thing is that after I’ll do for example Ctrl-0 twice (toggle tree-view and untoggle it) I have focus back where it should be.

Do you have any clues on how to fix that?