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

A uikitview is below B uikitview, but A uikitview is refreshed, so that B uikitview cannot respond to the click event #118366

Closed
chikang opened this issue Jan 12, 2023 · 19 comments · Fixed by flutter/engine#39527
Assignees
Labels
a: platform-views Embedding Android/iOS views in Flutter apps found in release: 3.3 Found to occur in 3.3 found in release: 3.7 Found to occur in 3.7 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on P1 High-priority issues at the top of the work list platform-ios iOS applications specifically r: fixed Issue is closed as already fixed in a newer version

Comments

@chikang
Copy link

chikang commented Jan 12, 2023

step:
1: Click the "Click Me" button, and a red B_uikitView native control pops up.
2: Then wait 5 seconds and the A_uikitView native control will show up,
3: At this point, the red B_uikitView native button is unresponsive

red button dont click!!!!!! why!!!!

my demo

UIKitViewDemo.zip

@chikang
Copy link
Author

chikang commented Jan 12, 2023

20230112-121526

@chikang
Copy link
Author

chikang commented Jan 12, 2023

problem : When the red view comes out, the green button cannot be clicked

@exaby73 exaby73 added the in triage Presently being triaged by the triage team label Jan 12, 2023
@exaby73
Copy link
Member

exaby73 commented Jan 12, 2023

I can reproduce this issue with the steps above. This may be a duplicate of #37579 but I cannot be certain of it. Labeling for further insights from the team

@exaby73 exaby73 added platform-ios iOS applications specifically framework flutter/packages/flutter repository. See also f: labels. a: platform-views Embedding Android/iOS views in Flutter apps has reproducible steps The issue has been confirmed reproducible and is ready to work on found in release: 3.3 Found to occur in 3.3 found in release: 3.7 Found to occur in 3.7 and removed in triage Presently being triaged by the triage team labels Jan 12, 2023
@chikang
Copy link
Author

chikang commented Jan 13, 2023

This doesn't look like #37579,My problem is inevitable, and a demo is provided,so,how to solve this problem?

@exaby73
Copy link
Member

exaby73 commented Jan 16, 2023

@chikang The team has yet to look at this issue and prioritize it. Unfortunately, the only thing to do is wait for that to happen

@chikang
Copy link
Author

chikang commented Jan 16, 2023

@chikang The team has yet to look at this issue and prioritize it. Unfortunately, the only thing to do is wait for that to happen

Well, I hope to hear from you soon @exaby73

@hellohuanlin
Copy link
Contributor

Did some initial investigation. From the debug view it looks like the green box is on top of the button:

Screenshot 2023-01-17 at 1 02 24 PM

However, in the actual screen, the red button is not covered by the green box. So my guess is that flutter's platform view actually crop out the central area of green box so that it doesn't cover the red button.

simulator_screenshot_34614D99-00AB-4302-9225-259C16E724D1

@cyanglaz probably has more insight?

@cyanglaz
Copy link
Contributor

cyanglaz commented Jan 17, 2023

Is the green uikitview intended to be below the red uikitview?

@hellohuanlin
Copy link
Contributor

@cyanglaz I think so, the red button is displayed using "showDialog" (which i assume should be the highest z order?):

FloatingActionButton(
    onPressed: () {
      showDialog(
          context: context,
          builder: (context) {
            return Container(
              width: 300,
              height: 300,
              child: const UiKitView(
                viewType: 'B_uikitView',
                creationParamsCodec: StandardMessageCodec(),
              ),
            );
          });
    },
    child: Text(
      '点我',
      style: TextStyle(color: Colors.white, fontSize: 13),
    )),
],

@goderbauer goderbauer added the P2 Important issues not at the top of the work list label Jan 17, 2023
@cyanglaz
Copy link
Contributor

So it might be a issue with zIndex of PlatformView when displaying in a dialog?

I think the click event worked as expected. The green view suppose to cover the red view, so the red view should not be handle touch events. The issue is the green view is displaying at the wrong zIndex.

@chikang
Copy link
Author

chikang commented Jan 29, 2023

So it might be a issue with zIndex of PlatformView when displaying in a dialog?

I think the click event worked as expected. The green view suppose to cover the red view, so the red view should not be handle touch events. The issue is the green view is displaying at the wrong zIndex.

I also think it has something to do with zIndex, but how to solve it, I don't know

@chikang
Copy link
Author

chikang commented Jan 30, 2023

How can red view get click events?

@chikang
Copy link
Author

chikang commented Jan 30, 2023

Is there a widget or API to solve this problem?

@KenwayDev
Copy link

img_v2_d8ff81b8-43a3-4cc2-8011-b4583bef3fag

I had the same problem:
The view in flutter is presented as half screen black at the top of the screen, and the view is a WKWebview. But as you can see from the Xcode view hierarchy, half a screen of WKWebview is blocked by another UIView. The event in WKWebview is now unclickable。

@exaby73

@hellohuanlin hellohuanlin added P1 High-priority issues at the top of the work list and removed P2 Important issues not at the top of the work list labels Feb 1, 2023
@hellohuanlin hellohuanlin self-assigned this Feb 1, 2023
@hellohuanlin
Copy link
Contributor

Is there any progress?

Hi, I got some good leads on this issue, but later got pulled into another issue so I paused it. Will resume after that issue is resolved.

@hellohuanlin
Copy link
Contributor

@chikang yep, from where i left off, it should be solvable if im not mistaken.

@chikang

This comment was marked as duplicate.

@jmagman
Copy link
Member

jmagman commented Feb 9, 2023

@chikang please refer to https://github.com/flutter/flutter/wiki/Issue-hygiene#do-not-add-me-too-or-same-or-is-there-an-update-comments-to-bugs. When there are update to report on this issue, it will be commented on and/or closed.

@github-actions
Copy link

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, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: platform-views Embedding Android/iOS views in Flutter apps found in release: 3.3 Found to occur in 3.3 found in release: 3.7 Found to occur in 3.7 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on P1 High-priority issues at the top of the work list platform-ios iOS applications specifically r: fixed Issue is closed as already fixed in a newer version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants