Focus cannot be set to u-ace in Excel add-in

(* I'm rerunning an old question that hasn't been resolved yet *)

I am doing an Excel add-in with a medium stack. I want to create a task page containing a JavaScript based native editor. I tried ui-codemirror and ui-ace , there is a problem in Excel for Windows: if we click on Excel and then go back to the editor area, the focus cannot be set in the editor area, so the content is NOT editable.

Here is the code with ui-ace

, it works well in the browser. However, when we are enveloping the same code in the Excel add-in, every time we click on Excel, then go to the editor area, we see mousedown

, focusset

, mousedown

and focusset

. And we cannot find focus, the content is NOT editable.

So does anyone know what is wrong with my code?

+3


source to share


1 answer


Wrap your call to focus $ timeout with something like:



$timeout( { element.focus() }, 0)

      

0


source







All Articles