ws-skeleton / eclipse-broadway

Eclipse running on the Web with broadway
Eclipse Public License 1.0
14 stars 9 forks source link

Keyboard events missed when including the broadway page in an IFrame #3

Closed mickaelistria closed 5 years ago

mickaelistria commented 6 years ago

When the Broadway page containing the IDE is included in an IFrame (like it's done in Che), the keyboard events seem to be not forwarded to the application.

mickaelistria commented 5 years ago

https://gitlab.gnome.org/GNOME/gtk/issues/1633

mickaelistria commented 5 years ago

It's a focus issue: seems like the broadway IFrame never retrieves focus. If calling document.getElementById('ide-application-iframe').contentWindow.focus() on the Che page with broadway in (or in general by calling frame.contentWindow.focus() in the IFrame containing broadway) gives focus to the IDE and let keyboard events be processed.

mickaelistria commented 5 years ago

Just adding onclick="window.focus()" on the body element of the inner document (generated by Broadway) does the work; but it's something that we can't work around and need to add in Broadway itself.

mickaelistria commented 5 years ago

Fixed.