5

私は jQuery Mobile アプリケーションhttp://gudulin.ru/test/problem.htmlを持っています。

ページのロード後に左側のパネルが開きます。 $('#my-panel').panel("open");

ページと @media cssにクラスを追加したui-responsive-panelので、パネルとページのコンテンツを一緒に操作できます。

ラップトップのブラウザではすべて問題ありませんが、iPad のブラウザ (Safari など) では問題があります。左パネルを開いてテキスト領域にテキストを入力し始めると、記号を入力した後にページがジャンプします。問題が発生するのは、テキストエリアの下部で入力を開始したときです (テキストがキーボードを下ったとき)。

意味がわからない場合は、次のビデオをご覧ください: http://www.youtube.com/watch?v=Q6_kM_FshrQ .

再現方法:

  1. iPadでhttp://gudulin.ru/test/problem.htmlを開く
  2. 左パネルが開いていることを確認する
  3. テキストエリアに何かを書き込んで、Enterボタンを数回押します。

ありがとう。

4

2 に答える 2

1

このwindow.resize を使用すると、仮想キーボードが原因で jquery モバイルで問題が発生します

it will be great solution.
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:33:57.267 に答える