Site in question: http://pizza.tgihost2.com
I'm using fullpage.js to display two food menus. There is one section with two slides. Each slide is its own food menu. The fullpage section is set to display: none at first. The fullpage section is revealed by the user via jquery.:
$('#launchPizzaMenu, .launch-menu').click(function() {
$('body').addClass('noscroll');
$.fn.fullpage.silentMoveTo('menu', 0);
$('#fullpage').slideDown(200);
});
The issue is the scrolling behavior on mobile when viewing the fullpage content. It's not smooth and fluid liek the rest of the page. When I scroll / flick, I'd expect it to continue to scroll a bit after I release my finger from the screen, but the scroll stops immediately and feels laborious to scroll through the fullpage content.
Here's my fullpage config:
$('#fullpage').fullpage({
anchors: ['menu'],
controlArrows: false,
autoScrolling: false,
responsiveWidth: 900,
afterResponsive: function(isResponsive){
}
});
Here's a gist showing the fullpage markup: https://gist.github.com/anonymous/0f8c33a2a875040edb7d5503238f8f71
There is one section with two slides.
Slide one starts on line 21.
Slide two starts on 152
How can I achieve smooth scrolling within the fullpage content?
You should be using the fullPage.js option scrollOverflow:true instead of your own overflow: scroll; for the section with bigger content.
See this example.
The smooth scrolling won't work as expected in all devices/browsers unless you use a library like iScroll.js, which is the one fullPage.js uses when using scrollOverflow:true.
Related
I am using iframe-resizer for cross domain application, The Iframe loads fine in desktop and andriod devices but on my Iphone, I am facing below issue:
The bootstrap modal pop ups on Iframe app is hiding and flickering behind when I scroll on page.
I tried
-webkit-overflow-scrolling: touch;
on container of Iframe but that does not work.
Any help/suggestion will be highly appreciated.
We fixed the issue by using position:absolute instead of position:fixed
Position fixed and absolute are somewhat similar in behavior. Both use x,y positioning in the view port and both are outside of the DOM document flow so other content is not affected by the placement of containers. Both require zIndex positioning to determine vertical priority in the view stack.
Position fixed keeps the element pinned at whatever position you set it to regardless of the scroll position of the browser. This makes sense in some scenarios where you actually want to scroll the entire page but leave content in place. The key to remember is to not use it when you build have your own scrollable content on the page.
It turns out in my case I don’t really need position:fixed because I manage the position and size of the container and toolbar headers and footers myself anyway. I know where everything is positioned and keep the content area effectively wedged in the middle of the statically sized elements. By way of CSS and media queries I can force the header to the top and the footer on the bottom using fixed sizes which means I can safely use position:absolute.
I've been given the task to try and fix an issue on this site:
[redacted]
When you tap below the bottom half of the screen on an iPhone 5, taps aren't registering and so links can't be clicked, etc.
I tried debugging by alerting what element is tapped, and nothing is registering below the halfway point. If you scroll down the page so the link you want to click is above the top half, it works perfectly fine.
I've searched around and there seems to be some issues with iPhone 5 apps (as far as I can tell, I'm not an app developer!) but I can't seem to find anyone having the same error on a responsive website.
What's going on - is it something to do with the viewport?
It looks like in your DOM you have an <iframe "id=FirebugUI"> that sits right below your element. It has some inline styles that include visibility:hidden; and a z-index of a super large number which means it's a hidden element that is on top of everything. You have some options:
1 - Get rid of it if you're familiar with what firebugUI is and can comfortably remove it all together. then you're good to go. It's probably being injected with some javascript.
2 - display none - you can add this css to remove it:
#FirebugUI {
display: none !important;
}
You'll need to add the important to the value so it overrides the inline styles. This may render the FirebugUI useless though.
3 - z index - you can update the z-index by setting it to like 0. But that will probably render this thing useless. so you might as well just remove this plugin if you're going to do that. You'll also need to use the !important value to override the inline styles.
At present, when a page is scrolled on Safari iOS 7 (11A4449D) the header chrome reduces in size and clicking anywhere in the bottom 44px of the viewport brings in the footer grey bar (with the next/prev page links etc).
Conversely, scrolling back up the page keeps the footer bar in place and the header bar at the larger size. Is there any meta-tag (or similar) in place to prevent this behaviour of make it consistent on both scroll-up and scroll-down?
We could work around the issue if the browser fired some JS event when the chrome came into/out of view but it doesn't.
Just as an update to this:
We eventually worked around this issue by using bottom: 0; instead of top: 100%; in the CSS. We had wanted to use top: 100% in the first instance as it meant that items being added into that element would be rendered down (off screen) automatically.
By taking the inverse approach we just have to manually translate the area off (using JS) an equal amount as the item being added.
This results in out 'sticky' footer staying above the bottom piece of OS chrome when that appears.
I have noticed that this new horizontal scroll bar at the bottom which I am unable to remove. I have attached an image in which i have also clearly marked the scroll bar which i am talking about. I know there is canvas setting in app settings but that is for the scroll bars above this one. When i scroll the marked scroll bar to the right the chat & notifications also get scrolled something which didn't use to happen before.
This is a reported Facebook API bug: http://developers.facebook.com/bugs/182748101891780
You can add to the "fb-like" attribute data-width="100px" (or whatever width you like) and it solves this issue.
Found the problem to be this element from FB ui, in the right column:
<div style="width:246px; height:69px; " class="_56vv _56vw" id="u_0_j">
It's the Recommended Games block, which has a carousel inside it. It should have a overflow:hidden in CSS. Tried to access it from my app via javascript, but FB blocked it.
This is the solution I used since this issue was making me crazier.
I use Stylish to customize Facebook, and I have a style installed that blocks all the useless crap on that site, i.e. friend recommendations, ads, unused navigation items on the left, etc.
All I did was find the DIV that holds the entire right sidebar and disabled it. This effectively got rid of the scrollbar and centers the main content within the middle DIV.
Here's the line I added to Stylish:
#rightCol {display:none;}
And just for your reference, here's the whole list I use for Facebook:
.rightColumnWrapper {display:none;}
#navHome{display:none;}
#pagelet_ego_pane {display:none;}
#pagelet_friend_list_suggestions {display:none;}
#appsNav {display:none;}
#pagelet_ticker {display:none;}
#fbSidebarGripper {display:none;}
#pagelet_welcome {display:none;}
#rightCol {display:none;}
.groupMemberSuggestionsList{display:none;}
.groupRecommendationsList{display:none;}
Hope this helps if you haven't already found a solution.
I have turned off horizontal scrolling by using the -ms-touch-action: pan-y; style. However I now have a child div that I need horizontal scrolling on. I have added the style:
-ms-touch-action: pan-x;
This works fine, however it still allows the default behaviors of IE10 to take over, swipe back to previous page etc. Is there a way to get horizontal scrolling whilst preventing the browser actions, or do I need to write a custom scrolling script using the MSPointer events?
Add
-ms-scroll-chaining: none;
to the element that has
-ms-touch-action: pan-x;
http://msdn.microsoft.com/en-us/library/windows/apps/hh466007.aspx