Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>rdougan's post did not work for me but it was a good starting point for my solution. </p> <pre><code>function androidSoftKeyHideFix(selectorName){ $(selectorName).on('focus', function (event) { $(selectorName).off('focus') $('body').on('touchend', function (event) { $('body').off('touchend') $('.blurBox').focus(); setTimeout(function() { $('.blurBox').blur(); $('.blurBox').focus(); $('.blurBox').blur(); androidSoftKeyHideFix(selectorName); },1) }); }); } </code></pre> <p>You need an input element at the top of the body, I classed as 'blurBox'. It must not be display:none. So give it opacity:0, and position:absolute. I tried placing it at the bottom of the body and it didn't work.</p> <p>I found it necessary to repeat the .focus() .blur() sequence on the blurBox. I tried it without and it doesn't work. </p> <p>This works on my 2.3 Android. I imagine that custom keyboard apps could still have issues.</p> <p>I encountered a number of issues before arriving at this. There was a bizarre issue with subsequent focuses retriggering a blur/focus, which seemed like an android bug. I used a touchend listener instead of a blur listener to get around the function refiring closing the keyboard immediately after a non-initial opening. I also had an issue with keyboard typing making the scroll jump around...which is realted to a 3d transform used on a parent. That emerged from an attempt to workaround the blur-refiring issue, where I didn't unblur the blurBox at the end. So this is a delicate solution.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload