Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@nbayati
Copy link
Contributor

@nbayati nbayati commented Apr 4, 2022

Created a workaround for ios Safari by adding a dummy event listener.

Fixes: flutter/flutter#70858
Fixes: flutter/flutter#101251

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Apr 4, 2022
@nbayati nbayati requested a review from yjbanov April 4, 2022 22:09
@nbayati nbayati marked this pull request as ready for review April 4, 2022 22:10
Copy link
Contributor

@mdebbar mdebbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seem to be some build errors:

error - test/canvaskit/semantics_test.dart:28:12 - Undefined name 'isIosSafari'. Try correcting the name to one that is defined, or defining the name. - undefined_identifier
error - test/engine/semantics/semantics_test.dart:18:8 - Target of URI doesn't exist: '../../common.dart'. Try creating the file referenced by the URI, or Try using a URI for a file that does exist. - uri_does_not_exist

@skia-gold
Copy link

Gold has detected about 8 new digest(s) on patchset 15.
View them at https://flutter-engine-gold.skia.org/cl/github/32415

@mdebbar
Copy link
Contributor

mdebbar commented May 13, 2022

It looks like the cleanup didn't fix the failure. I spent some time this morning debugging the test failure and found the problem. The cleanup that you did is necessary, but it's not working because the listeners are stored as static members:

static final Map<String, html.EventListener> _listeners =
<String, html.EventListener>{};
/// Listeners that are registered through native javascript api.
static final Map<String, html.EventListener> _nativeListeners =
<String, html.EventListener>{};

That means all PointerBinding/Adapter instances are sharing the same map of listeners.

If you remove static from those two members, things will start working as expected.

Copy link
Contributor

@mdebbar mdebbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[IOS Web]Cannot click on flutter web app inside iframe [web] Gestures inside iframe doesn't work on iOS

4 participants