framework7 icon indicating copy to clipboard operation
framework7 copied to clipboard

Timeline not scrollable with iNoBounce

Open scriptPilot opened this issue 9 years ago • 8 comments

This is a (multiple allowed):

  • [ ] bug
  • [x] enhancement
  • [ ] feature-discussion (RFC)

What you did

To avoid bouncing on iOS Web Apps, I use https://github.com/lazd/iNoBounce. So far, it works well with Framework7 in general, but not with horizontal timeline / calendar elements.

Expected Behavior

Horizontal scrolling is possible.

Actual Behavior

Scrolling is not possible. Disabling iNoBounce will fix it. Is there any way to enable the usage of iNoBounce even with these new nice elements?

PS: Horizontal scrolling in data tables, sliders etc. works well with iNoBounce!

scriptPilot avatar Apr 07 '17 21:04 scriptPilot

I just figured out, that there is no issue with horizontal scrolling on data tables!

scriptPilot avatar May 01 '17 00:05 scriptPilot

if you are using iOs webview please try the following: webview.scrollView.bounces = no;

its work with my case to prevent bounce for the whole webview content.. but not for parts of the HTML content..

mohshraim avatar May 01 '17 10:05 mohshraim

@mohshraim - Thank you for that tip! Do you have a full example how to use that in a "normal" Cordova app? Are there any additional plugins required?

scriptPilot avatar May 08 '17 09:05 scriptPilot

just add webview to your view controller

this code on load

 NSString *urlAddress = [[NSBundle mainBundle] pathForResource:@"htmlFolder/index" ofType:@"html"];
NSURL *url = [NSURL fileURLWithPath:urlAddress];
NSURLRequest *request = [NSURLRequest requestWithURL:url];

_webView = [[UIWebView alloc] initWithFrame:self.view.frame];
[_webView loadRequest:request];
_webView.scrollView.bounces = NO;
_webView.keyboardDisplayRequiresUserAction=NO;
[_webView setScalesPageToFit:true];
[_webView setDelegate:self];
[self.view addSubview:self.webView];

mohshraim avatar May 08 '17 13:05 mohshraim

@mohshraim - I provide HTML / JS code to Cordova, so I am not manipulating any iOS or Android code itself. Where do you place that code?

scriptPilot avatar May 08 '17 15:05 scriptPilot

If you use Cordova this will not help you... sorry... i used to implement the iOS and android with impeded HTML app by myself without Cordova or Phone Gap. on that case my code will make it easy for you..

mohshraim avatar May 08 '17 16:05 mohshraim

Quick Google suggests <preference name="DisallowOverscroll" value="true" /> in config.xml

ZanderBrown avatar May 08 '17 16:05 ZanderBrown

Issue is closed because of outdated/irrelevant/not actual

If this issue is still actual and reproducible for latest version of Framework7, please create new issue and fill the issue template correctly:

  • Clearly describe the issue including steps to reproduce when it is a bug.
  • Make sure you fill in the earliest version that you know has the issue.
  • Provide live link or JSFiddle/Codepen or website with issue

nolimits4web avatar Mar 07 '18 14:03 nolimits4web