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

When I use official force to open the Element plus website, the dropdown selection box does not work and I cannot choose #2341

Open
1 of 2 tasks
gk-1213 opened this issue Oct 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@gk-1213
Copy link

gk-1213 commented Oct 12, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When I use official force to open the Element plus website, the dropdown selection box does not work and I cannot choose

Expected Behavior

The dropdown menu of Element plus allows for normal selection

Steps with code example to reproduce

Steps with code example to reproduce
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';

WebViewEnvironment? webViewEnvironment;

Future main() async {
  WidgetsFlutterBinding.ensureInitialized();

  if (!kIsWeb && defaultTargetPlatform == TargetPlatform.windows) {
    final availableVersion = await WebViewEnvironment.getAvailableVersion();
    assert(availableVersion != null,
    'Failed to find an installed WebView2 Runtime or non-stable Microsoft Edge installation.');

    webViewEnvironment = await WebViewEnvironment.create();
  }

  if (!kIsWeb && defaultTargetPlatform == TargetPlatform.android) {
    await InAppWebViewController.setWebContentsDebuggingEnabled(kDebugMode);
  }

  runApp(const MaterialApp(home: MyApp()));
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final GlobalKey webViewKey = GlobalKey();

  InAppWebViewController? webViewController;
  InAppWebViewSettings settings = InAppWebViewSettings(
      isInspectable: kDebugMode,);

  double progress = 0;

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(title: const Text("Official InAppWebView website")),
        body: SafeArea(
            child: Column(children: <Widget>[
              Expanded(
                child: Stack(
                  children: [
                    InAppWebView(
                      key: webViewKey,
                      webViewEnvironment: webViewEnvironment,
                      initialSettings: settings,
                      onWebViewCreated: (controller) async {
                        webViewController = controller;
                        await controller.loadUrl(
                            urlRequest: URLRequest(url: WebUri('https://element-plus.org/en-US/component/select.html')));
                      },
                      onProgressChanged: (controller, progress) {
                        setState(() {
                          this.progress = progress / 100;
                        });
                      },
                    ),
                    progress < 1.0
                        ? LinearProgressIndicator(value: progress)
                        : Container(),
                  ],
                ),
              ),
            ])));
  }
}

Stacktrace/Logs

Stacktrace/Logs
no

Flutter version

v3.24.3

Operating System, Device-specific and/or Tool

Windows

Plugin version

v6.1.5

Additional information

mp4

2024-10-12.140225.mp4

Self grab

  • I'm ready to work on this issue!
@gk-1213 gk-1213 added the bug Something isn't working label Oct 12, 2024
@pichillilorenzo
Copy link
Owner

Unfortunately, the current Microsoft WebView2 doesn't have an API to really have a correct offscreen rendering inside a Flutter texture.
This causes issues such as this!

Check more info on the issue I opened on the official Microsoft WebView2 repo: MicrosoftEdge/WebView2Feedback#4944

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants