为什么在文本字段中输入文本时它们会上升? [英] why thems go up when entering the text in text field?

查看:58
本文介绍了为什么在文本字段中输入文本时它们会上升?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am using jqm .Actually I open the pop up screen on button click .I am facing a problem my them goes up while entering the text.Here is my code..

http://jsfiddle.net/ravi1989/7JqRG/

 <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>

请在标题上+按钮.弹出框将其填满,然后将其填满.

Please + button on header .Pop up open fill the text black them goes up?

推荐答案

这是您的答案.由于虚拟键盘导致的 window.resize导致以下问题jQuery mobile

Here is your answer.. window.resize due to virtual keyboard causes issues with jquery mobile

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;
}

这篇关于为什么在文本字段中输入文本时它们会上升?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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