IOS cordova JQM键盘移动固定位置页眉,页脚和搜索栏 [英] IOS cordova JQM keyboard moves fixed position header,footer and searchbar

查看:114
本文介绍了IOS cordova JQM键盘移动固定位置页眉,页脚和搜索栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I have a major issue with apache cordova, this is an IOS-specific issue, I am using Jquery-mobile. The issue appears whenever one does a search on a listview control then my fixed position header, footer and search input moves down.. here is the markup of my page...

            <!DOCTYPE HTML>
            <html>
            <head>
            <title>Contacts</title>
                <meta charset="utf-8" />
                <meta name="format-detection" content="telephone=no" />
                <meta name="msapplication-tap-highlight" content="no" />
                <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
                <link href="css/jquery.mobile-1.4.5.min.css" rel="stylesheet" />
                <link href="css/jquery.mobile.icons.min.css" rel="stylesheet" />
                <link href="css/jquery-ui.min.css" rel="stylesheet" />
            </head>
            <body>
            <style>
                #my-wrapper
            {
                padding-top: 81px;
                background-color: rgb(250, 246, 246);

            }
                #my-wrapper form {
                position: fixed;
                left: 2%;
                right :2%;
                top: 35px;
                width: 96%;
                z-index: 2;
                background-color: rgb(250, 246, 246);
                border-color : rgb(120, 120, 120);
                text-shadow:unset;
                box-shadow:unset;
            }
                #ContactHeader
            {
                position: fixed;
                top: 0px;
                width: 100%;
                z-index: 1;
            }
            </style>
            <div id="employeeListPage" data-role="page" >
                <div id="ContactHeader" data-role="header" style="height:32px ; ">
                    <a class="ui-btn-left" data-icon="arrow-l" href="#" onclick="window.location.replace('index.html');" style="vertical-align:text-top; height:8px"></a>
                    <h2>Contacts</h2>

                </div>
                <div id="my-wrapper" data-role="main">
                    <ul id="employeeList" data-role="listview" data-inset="true" data-filter="true" data-filter-theme="staticscroll"  data-filter-placeholder="Search Contacts/Companies" ></ul>
                </div>
                <div data-role="footer" style="text-align:center; width: 100%;height: 25px;position:fixed;bottom: 0px;left: 0px;right: 0px;">My footer</div>
                <div id="loadmoreajaxloader" style="display:none;"><center><img src="css/images/bw-loader.GIF" /></center></div>
            </div>
            <script type="text/javascript" src="cordova.js"></script>
            <script src="js/jquery.js" type="text/javascript"></script>
            <script src="js/jquery.mobile-1.4.5.min.js"></script>
            <script src="js/contactlist.js"></script>
            </body>
            </html>
I also have an event that fire when a user starts typing in the search bar

                $(document).on("pagecreate", "#employeeListPage", function () {
                $("#employeeList").on("filterablebeforefilter", function (e, data) {
                    var URL = window.localStorage.getItem("ContactsForSearch");
                    URL = URL + '/' + nextNo + '/' + value;
                    $.getJSON(URL, function (info) {
                        if (info.length === 0) {
                            nomoredata = true;
                            //alert('no more data to display');
                            $('#employeeList').append('<br>');
                            $('#employeeList').append('<center><h2>No Data <h2>   </center>');
                        }
                        else {
                            $('#employeeList').append('<li style="border-top: 1px solid #0189D0;"><a    data-transition="slide" href="employeedetails.html?id=' + id + '&comnum=' + comNum + '&contactNum=' + contactNumber + '"><h2>' + companyName + '</h2>    <small>' + name + ' - ' + designation + '</small>' + '</a>' + '</li>');
                        }
                    });
                });
            });
please help..

推荐答案

(文件).on(pagecreate,#employeeListPage,function() {
(document).on("pagecreate", "#employeeListPage", function () {


(#employeeList)。on(filterablebeforefilter,function(e,data){
var URL = window.localStorage.getItem(ContactsForSearch);
网址=网址+'/'+ nextNo +'/'+值;
("#employeeList").on("filterablebeforefilter", function (e, data) { var URL = window.localStorage.getItem("ContactsForSearch"); URL = URL + '/' + nextNo + '/' + value;


.getJSON(网址,函数(信息){
if(info.length) === 0){
nomoredata = true;
// alert('不再显示数据');
.getJSON(URL, function (info) { if (info.length === 0) { nomoredata = true; //alert('no more data to display');


这篇关于IOS cordova JQM键盘移动固定位置页眉,页脚和搜索栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆