QML WebView usability on Harmattan
Hi,
I try to use a QML WebView, and it works more or less, with a few quirks:
- When pressing a text input field, the sw keyboard doesn't pop up immediately, only when pressing it a second time once it already has focus.
- The much bigger issue: Once I've pressed a text input field and the sw keyboard is shown, it doesn't seem to get hidden again when I tap outside of text fields in the web view. I don't seem to be able to close the keyboard in any way at all. I could of course try to close it manually, but I haven't found a suitable signal or property change to attach to, that I could use for closing it. Now when the keyboard is shown, the PageStackWindow toolbar is hidden, obscuring the navigation controls that I'd like to use to be able to get out from the web view.
Re: QML WebView usability on Harmattan
I found a few other major issues related to the QML WebView rendering html forms combined with the software keyboard, that can lead to the whole phone UI becoming unusable (due to a misbehaving WebView), that I reported at [url]http://www.developer.nokia.com/bugs/show_bug.cgi?id=319[/url].
Re: QML WebView usability on Harmattan
Thanks for reporting this. I have forwarded this issue to the platform team
Hartti
Re: QML WebView usability on Harmattan
Just to be sure; have you put your QML component in a PageStackWindow hierarchy? I've understood that keyboard focus issues are also related to cases when the component is not in a PageStackWindow hierarchy.
Re: QML WebView usability on Harmattan
Yes, it's in a PageStackWindow - check out the sample application in the bug report if you're interested in details.
Re: QML WebView usability on Harmattan
I have same issues with WebView .. keyboard does not pop out on first press, and then it does not go away .. Even after rotating the orientation.
If the web view is in a Sheet, after closing the sheet, the VKB is still present
It disappears only when swiping the application into inactive, or opening the physical keyboard on N950
Re: QML WebView usability on Harmattan
Ok, there is some good news regarding this issue. I was also having the very same problem with sw. keyboard. I found a nice workaround. I created EventFilter class, attached it to QApplication object and made it intercept all QEvent that is fired. We are only interested in QEvent::KeyPress event which represent sw keyboard stroke. On the other side, within QML scene i have inserted invisible TextEdit element, which have function [ void TextEdit::closeSoftwareInputPanel () ] for closing keyboard. Now, all that remains to do is to connect signal (emitted when interception of Qt::Key.EnterKey occurred) with QML slot ( closeSoftwareInputPanel ) and keyboard is close once the user press Enter key.
I hope that this would help you guys.
Best regards,
Uros