问题
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?
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 = {};
回答1:
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;
}
来源:https://stackoverflow.com/questions/17854719/how-to-handle-them-jump-outwhile-keyboard-open-in-query-mobile