Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No bounce in inappwebview iOS #696

Closed
delay opened this issue Mar 1, 2021 · 8 comments
Closed

No bounce in inappwebview iOS #696

delay opened this issue Mar 1, 2021 · 8 comments

Comments

@delay
Copy link

delay commented Mar 1, 2021

I really like your packages flutter_inappwebview and your flutter_browser_app. It seems to have a lot more features than the flutter_webview package from the flutter team. The one feature I can't seem to make work is there is no bounce when scrolling to the top or bottom of webviews like on flutter_webview or default ios views, flutter_webview does have this but is missing all the other features that make your package so great. Without the bounce it is very jarring for iOS users who are expecting the bounce behavior. Is there any way to make this active in your package?

I have included the minimal code to reproduce the issue. To reproduce: Just scroll to the bottom of the Webview and notice there is no bounce. Normally on iOS there is a bounce similar to the default bounce in a flutter Listview. Thanks for any info on how I might solve this or whether it can be included in your package. Thanks for making such a great package!

import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';

Future main() async {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(new Browser());
}

class Browser extends StatefulWidget {
  @override
  _BrowserState createState() => new _BrowserState();
}

class _BrowserState extends State<Browser> {
  InAppWebViewController _webViewController;
  String url = "";
  double progress = 0;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title:
              Text("${(url.length > 50) ? url.substring(0, 50) + "..." : url}"),
        ),
        body: InAppWebView(
          initialUrl: "https://google.com",
          initialOptions: InAppWebViewGroupOptions(
              ios: IOSInAppWebViewOptions(
                  alwaysBounceVertical: true, disallowOverScroll: false),
              crossPlatform: InAppWebViewOptions(
                debuggingEnabled: true,
              )),
          onWebViewCreated: (InAppWebViewController controller) {
            _webViewController = controller;
          },
          onLoadStart: (InAppWebViewController controller, String url) {
            setState(() {
              this.url = url;
            });
          },
          onLoadStop: (InAppWebViewController controller, String url) async {
            setState(() {
              this.url = url;
            });
          },
          onProgressChanged: (InAppWebViewController controller, int progress) {
            setState(() {
              this.progress = progress / 100;
            });
          },
        ),
      ),
    );
  }
}
@pichillilorenzo pichillilorenzo transferred this issue from pichillilorenzo/flutter_browser_app Mar 1, 2021
@pichillilorenzo
Copy link
Owner

Wow, that's a bug!
Thanks for reporting!
I'm working on it

@pichillilorenzo
Copy link
Owner

fixed with the latest release 5.0.5+1

@delay
Copy link
Author

delay commented Mar 1, 2021

Thank you! Thank you! Thank you! Working great in the latest build! Now I can switch over from flutter_webview to your package in my own app. Thanks so much!

@pichillilorenzo
Copy link
Owner

pichillilorenzo commented Mar 1, 2021

Thanks a lot for your support @delay!

If you want, you can submit your app to the new website of this plugin, which is inappwebview.dev, using the Submit App page!

Your app will be visible to the Showcase page that contains an open list of apps built with Flutter and Flutter InAppWebView!

The website is new (I published it just some days ago), so there is only my Flutter Browser App at the moment.
I hope other people submit their apps using the inappwebview plugin! 😄

@delay
Copy link
Author

delay commented Mar 1, 2021

I will definitely submit my app! It will be a while as I am just starting it but once I complete it I will submit it for sure. Your package should save me a lot of time!

@pichillilorenzo
Copy link
Owner

Ok! Thanks a lot again for the support! It is people like you who give so much satisfaction to the work done 😄

@delay
Copy link
Author

delay commented Mar 5, 2021

No problem, it was the least I could do. I ran into another issue #702 (comment)
Not sure if this is fixable or not. I do need this feature for my own app as I am trying to use gestures to open and close a custom drawer. Anyway thanks for taking a look. Keep up the good work!

Copy link

github-actions bot commented Nov 6, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants