如何处理它们在查询移动设备中跳出(在键盘打开的情况下)? [英] How to handle them jump out(while keyboard open) in query mobile?

查看:56
本文介绍了如何处理它们在查询移动设备中跳出(在键盘打开的情况下)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上我遇到一个问题,当用户单击文本字段时,它们会上升?我正在使用查询移动版1.3. 这是我的同样问题. 为什么它们会上升在文本字段中输入文本时?

I am facing one problem actually my them goes up when user click on text field ?I am using query mobile 1.3. THIS IS MY SAME PROBLEM . why thems go up when entering the text in text field?

解决方案 jQuery Mobile响应面板和Textarea 我使用此解决方案,但未获得正确的结果. 这是我的手机1.3 js http://jsfiddle.net/fMWnz/

Solution jQuery Mobile Responsive Panel and Textarea I use this solution but not get proper result. Here is my mobile 1.3 js http://jsfiddle.net/fMWnz/

我应该在哪一行更改以使其起作用

In which line i should change so that it will work

(function(root, doc, factory) {
    if (typeof define === "function" && define.amd) {
        // AMD. Register as an anonymous module.
        define(["jquery"], function($) {
            factory($, root, doc);
            return $.mobile;
        });
    } else {
        // Browser globals
        factory(root.jQuery, root, doc);
    }
}(this, document, function(jQuery, window, document, undefined) {
    (function($) {
        $.mobile = {};
    }(jQuery));
    (function($, window, undefined) {
        var nsNormalizeDict = {};

推荐答案

这是您的答案. 由于虚拟键盘导致的 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天全站免登陆