← Back to team overview

ubuntu-phone team mailing list archive

Re: Triggering on-screen keyboard with HTML5 SDK

 

Hi Robert,

On Wed, Mar 26, 2014 at 1:56 PM, Robert Schroll <rschroll@xxxxxxxxx> wrote:

> On Tue, Mar 25, 2014 at 5:10 PM, Robert Schroll <rschroll@xxxxxxxxx>
> wrote:
>
>> On Tue, Mar 25, 2014 at 10:04 AM, Alexandre Abreu <
>> alexandre.abreu@xxxxxxxxxxxxx> wrote:
>>
>>> Hi Robert,
>>>
>>> The gist of the issue is OSK not popping up when js sets the focus in a
>>> text field.
>>>
>>
>> I'll agree that fixing this would be enough for me to get by with.
>>
>
> I've played around with this a bit more, and it seems that the OSK fails
> to appear only if you try to activate it before the user has interacted
> with the WebView.  While this is a problem in general, I escape as I only
> want the OSK for an inner page of the application.
>

afaik (and I have to further validate it), it fails to appear when js has
set the focus to a given (text) element and the user clicks on the text
element, no OSK pops up unless the user manually forces the focus elsewhere
and back to the text field,


>
> So I've added a dummy text input to my HTML to act as my focus trigger. It
> doesn't work with display: none, but I can make it a pixel big and toss it
> somewhere out of the way.  (If I make it zero pixels in size, the web
> process crashes.)  But -- pressing OSK buttons while this has focus doesn't
> seem to generate any key events, either for the document in general or for
> the input specifically!  Is this a known problem?  Is there a work around?
>  Or is there a different set of events to which I should be listening?
>

I'll give it a try, but it should work; are you sure the events are not
caught by some element?

Follow ups

References