diff options
author | Jon Kristensen <info@jonkri.se> | 2017-06-30 03:32:30 +0200 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2018-06-19 12:43:40 +0100 |
commit | d868e9242a298142431e4ac1a398709a45bb4803 (patch) | |
tree | 310936b979d8c4684d5a0221bc8c713def49122f /www/js/app.js | |
parent | 1f10f6266418230356854cadcb581f050a5c7936 (diff) |
Unfocus input fields when activating the help layer on iOS
Fixes #229
Diffstat (limited to 'www/js/app.js')
-rw-r--r-- | www/js/app.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/www/js/app.js b/www/js/app.js index 0ad02f8..8b7432c 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -339,7 +339,16 @@ var tpl = { $(document).on('ajaxStart', function() { $.mobile.loading('show'); } ); $(document).on('ajaxStop', function() { $.mobile.loading('hide'); } ); - $('#display-help').on('vclick', function(e) { FMS.helpShow(e); } ); + $('#display-help').on('vclick', function(e) { + // Avoid a problem with input cursors being visible through + // the help layer on Web View, by unfocusing the element + if (device.platform === 'iOS') { + $('input').blur(); + } + + FMS.helpShow(e); + }); + $('#dismiss').on('vclick', function(e) { FMS.helpHide(e); } ); FMS.allDrafts.comparator = function(a,b) { var a_date = a.get('created'), b_date = b.get('created'); return a_date === b_date ? 0 : a_date < b_date ? 1 : -1; }; |