Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery mobile 为什么在文本字段中输入文本时主题会上升?_Jquery Mobile - Fatal编程技术网

Jquery mobile 为什么在文本字段中输入文本时主题会上升?

Jquery mobile 为什么在文本字段中输入文本时主题会上升?,jquery-mobile,Jquery Mobile,我正在使用jqm。实际上,我在单击按钮时打开了弹出屏幕。我遇到了一个问题,我的按钮在输入文本时出现了问题。这是我的代码 我的案子 案例信息 案例名称: 案件日期: 案例说明: 请按页眉上的+按钮。弹出“打开”填充文本,然后将其变为黑色?这是您的答案。。 你是在设备上还是在桌面上进行测试?检查chrome中的小提琴链接,它工作正常。Ipad和平板电脑中的设备相同。@sheetal在chrome上工作正常。但问题在设备上。在IOS和Android设备中。检查此答案 <div da

我正在使用jqm。实际上,我在单击按钮时打开了弹出屏幕。我遇到了一个问题,我的按钮在输入文本时出现了问题。这是我的代码


我的案子
案例信息 案例名称: 案件日期: 案例说明:
请按页眉上的+按钮。弹出“打开”填充文本,然后将其变为黑色?

这是您的答案。。


你是在设备上还是在桌面上进行测试?检查chrome中的小提琴链接,它工作正常。Ipad和平板电脑中的设备相同。@sheetal在chrome上工作正常。但问题在设备上。在IOS和Android设备中。检查此答案
 <div data-role="page" id="Home" > 
        <div data-role="header" data-theme="b" data-position="fixed" data-tap-toggle="false" >
            <h1 class="ui-title"  id="hdr" style="text-align:left;margin-left: 20px;">My Cases</h1>
            <div class="ui-btn-right" id="headerButtons" data-role="controlgroup" data-type="horizontal">
                <a href="#UserSettingScreen" data-transition="none" data-role="button" data-inline="true" data-iconpos="notext" data-icon="gear" data-theme="b" id="Setting" data-rel="popup" data-position-to="window">Setting</a>
                <a href="#CaseInformationScreen" data-transition="none" data-role="button" data-iconpos="notext" data-inline="true" data-icon="plus" data-theme="b" data-rel="popup" id="Add" data-position-to="window">Add</a>
                <a href="" data-role="button" data-transition="none" data-inline="true" data-theme="b" data-rel="popup"id="Edit" data-position-to="window">Edit</a>
            </div>
        </div>

        <div data-role="content">

            <ul data-role="listview" data-inset="true" id="folderData" >
            </ul>
            <!-- **************Case Information Pop up Start*******************-->
            <div data-role="popup" id="CaseInformationScreen" data-close-btn="none"  data-overlay-theme="a" data-dismissible="false">
                <div data-role="header" data-theme="b" >

                    <a href="#" data-role="button" data-corners="false" id="Cancel">Cancel</a>
                    <h1>Case Information</h1>
                    <a href="#" data-role="button" data-corners="false" id="AddButton">Add</a>
                </div>

                <div data-role="content">
                    <div><img src="img/Documents.png"/></div>
                    <div data-role="fieldcontain">
                        <label for="text-12" style="text-align:top;margin-left: 0px;">Case Name:</label>
                        <input name="text-12" id="text-12" value="" type="text" class="caseName_h" autocorrect="off">
                    </div>
                    <div data-role="fieldcontain">
                        <label for="caseDate" style="text-align:left;margin-left: 0px;" >Case Date:</label>
                        <input name="caseDate" id="caseDate" value="" type="date" class="caseDate_h" >
                           <!--input name="mydate2" id="mydate2" type="date" data-role="datebox" class="caseDate_h" data-options='{"mode": "calbox","useNewStyle":true,"zindex":1200}'/-->
                    </div>
                    <div data-role="fieldcontain">
                        <label for="textarea-12">Case Notes :</label>
                        <textarea cols="40" rows="8" name="textarea-12" id="text-12" class="caseTextArea_h" autocorrect="off"></textarea>
                    </div>
                </div>
            </div>
1) Go into jquery.mobile-1.x.x.js

2) Find $.mobile = $.extend() and add the following attributes:

last_width: null,
last_height: null,
3) Modify getScreenHeight to work as follows:

getScreenHeight: function() {
    // Native innerHeight returns more accurate value for this across platforms,
    // jQuery version is here as a normalized fallback for platforms like Symbian

    if (this.last_width == null || this.last_height == null || this.last_width != $( window ).width())
    {
        this.last_height = window.innerHeight || $( window ).height();
        this.last_width = $(window).width();
    }
    return this.last_height;
}