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

Fix WebView hanging input #2616

Merged
merged 11 commits into from
Apr 12, 2024
Merged

Fix WebView hanging input #2616

merged 11 commits into from
Apr 12, 2024

Conversation

mallexxx
Copy link
Collaborator

@mallexxx mallexxx commented Apr 12, 2024

Task/Issue URL: https://app.asana.com/0/1177771139624306/1206990108527681/f

Description:

  • fixes the mouse event queue overflow issue when loading websites (see https://app.asana.com/0/0/1207061219313301/f)
  • the fix is done by proxying NSTrackingArea delegate and suppressing mouse events while Web View is loading

Steps to test this PR:

  1. Add the attached snippet to WindowControllersManager.swift:125
    WindowControllersManager.swift.zip
  2. Create a bookmark to twitter.com on your bookmark bar
  3. Click the bookmark on the home tab, wait until ❗️ that‘s it appears in the log and verify mouse input is working, repeat
  4. Repeat opening the bookmark when another website is open

Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@mallexxx mallexxx requested a review from samsymons April 12, 2024 14:00
Copy link
Collaborator

@samsymons samsymons left a comment

Choose a reason for hiding this comment

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

Seems good to me pending CI getting back to a green state, looks like a recent commit broke some compilation, I tested before it was added though.

I'm no longer able to reproduce the bug (neither by using your provided changes, or when testing by hand), and I spent some time smoke testing other sites, including testing in a slow network environment via Network Link Conditioner, to make sure that we aren't introducing weird behaviour when the web view takes a long time to load.

I'll approve this, feel free to merge once it's green. Great work! Next step here is on me to try and get this happening in a standalone project that we can send to Apple.

Copy link
Collaborator

@samsymons samsymons left a comment

Choose a reason for hiding this comment

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

LGTM, new changes are working well 👍

I tested on regular conditions, poor networks, etc., tried to find a way to break webview interaction but couldn't, and the bug is gone in all of my testing. Nice work!

@samsymons samsymons merged commit f71541b into release/1.83.0 Apr 12, 2024
17 checks passed
@samsymons samsymons deleted the alex/fix-hanging-input branch April 12, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants