मैं वास्तव में ठीक उसी मुद्दा हो रहा है। मैंने इसे इस तथ्य से कम कर दिया है कि यह डीआईवी को प्रभावित करता है जिनकी सामग्री को तब बदलना पड़ता है जब अभिविन्यास बदल जाता है।
आपके उदाहरण में। परिदृश्य में दाएं स्क्रॉल पर डीआईवी, पोर्ट्रेट में स्क्रॉल करने की आवश्यकता नहीं है, लेकिन फिर फिर से स्क्रॉल करने की आवश्यकता है। मैंने इसका परीक्षण किया है जब दोनों डीआईवी (बाएं और दाएं) को अभिविन्यास के बावजूद स्क्रॉल करने की आवश्यकता है और यह कोई समस्या नहीं है।
अद्यतन:
मैं वास्तव में लगता है यह तय कर दी है करने के लिए!
यह समस्या एक समय मुद्दा प्रतीत होता है। आकार बदलने के दौरान आंतरिक सामग्री बाहरी डीवी पर स्क्रॉलिंग के लिए पर्याप्त नहीं है जो अतिप्रवाह है। इस पर एक दिन बर्बाद कर के बाद, मैं अंत में इस हैक के साथ आया था:
<div id="header" style="position:fixed; height:100px">Header</div>
<div id="content" style="overflow: auto; -webkit-overflow-scrolling: touch">
<div id="contentInner">
content that is not long enough to always scroll during different orientations
</div>
</div>
यहाँ मेरी तर्क है कि जब भी पेज का आकार बदलता है:
function handleResize()
{
var iHeight = $(window).height() - $("#header").height();
// Height needs to be set, to allow for scrolling -
//this is the fixed container that will scroll
$('#content').height(iHeight - 10);
// Temporarily blow out the inner content, to FORCE ipad to scroll during resizing
// This is a timing issue where the inner content is not big enough during resize post orientation to require the outer DIV to scroll
$('#contentInner').height(1000);
// Set the heights back to something normal
// We have to "pause" long enough for the re-orientation resize to finish
window.setTimeout(delayFix, 10);
}
function delayFix()
{
var iHeight = $(window).height() - $("#header").height();
// Inner divs force the outer div to always have at least something to scroll. This makes the inner DIV always "rubber-band" and prevents
// the page from scrolling all over the place for no reason.
// The height of the inner guy needs to be AT LEAST as big as the container and actually a nip bigger to cause the
// scrollable area to 'rubber band' properly
$('#contentInner').height(iHeight + 20);
}
मैं पूरी तरह से इस प्रश्न के बारे में भूल गया, मैं वास्तव में आपके जैसा सटीक समाधान के साथ इसे भी समझ रहा हूं। मुझे कोड को यहां वापस रखना चाहिए था, आपको कुछ समय बचाया, ओह! धन्यवाद हालांकि :) – will
किसी और को दिलचस्पी है तो कोई और तरीका मिला ... कोई टिप्पणी स्वागत है। निचे देखो। –
वह वास्तव में महान काम करता है। बहुत बुरा गड़बड़ पहली जगह में होना चाहिए। –