0

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

解决方案 jQuery Mobile 响应式面板和 Textarea 我使用了这个解决方案,但没有得到正确的结果。这是我的移动 1.3 js http://jsfiddle.net/fMWnz/

我应该在哪一行更改以便它可以工作

(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 = {};
4

1 回答 1

1

这是你的答案.. window.resize 由于虚拟键盘导致 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;
}
于 2013-07-26T05:13:35.220 回答