flexxui / webruntime

Launch HTML5 apps in the browser or a desktop-like runtime.
http://webruntime.readthedocs.io
BSD 2-Clause "Simplified" License
43 stars 10 forks source link

How to focus the dom on launch? #20

Closed caph1993 closed 4 years ago

caph1993 commented 4 years ago

After launching a flexx app with app.launch('app'), the document seems not to be focused ( document.hasFocus() returns false).

Is it possible to have the DOM focused on launch? Some functions, such as focusing particular elements rely on the DOM being focused on the first place.

almarklein commented 4 years ago

No, unfortunately this is not possible. The app is basically a browser window, and browsers don't allow the JS to focus the window.

almarklein commented 4 years ago

I'm sorry that I have to answer all your questions with "no" :)