Repository navigation
Fix: activateSystemCursor should set cursor on all views - #185080
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the web engine to apply system mouse cursors to specific view elements rather than the document body, resolving several TODOs. Changes include iterating through all active views in the EnginePlatformDispatcher to update their respective cursors and adjusting tests to verify styles on the root view element. Feedback suggests optimizing the cursor activation loop by extracting the 'kind' argument lookup to avoid redundant map lookups for each view.
6759367 to
61b2688
Compare
mdebbar
left a comment
There was a problem hiding this comment.
Thank you for the contribution!
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
autosubmit label was removed for flutter/flutter/185080, because This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.
|
|
@mdebbar Can you help in debugging this issue with Google testing? It says "Please contact Google Developer" |
|
autosubmit label was removed for flutter/flutter/185080, because This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.
|
c30e0b7 to
46d4046
Compare
|
autosubmit label was removed for flutter/flutter/185080, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
autosubmit label was removed for flutter/flutter/185080, because - The status or check suite Dashboard Checks has failed. Please fix the issues identified (or deflake) before re-applying this label. |
Fixes flutter#140226 The mouse cursor was being set only on document.body, which caused two issues: 1. It polluted the cursor for non-Flutter parts of the page 2. It didn't work correctly when Flutter views were moved to Picture-in-Picture windows This change: - Sets the CSS cursor property on each <flutter-view> element instead of body - Applies the cursor change to all registered views simultaneously - Lets the browser's native CSS cursor switching handle per-element cursor changes automatically This approach was agreed upon in the issue discussion as the best solution, avoiding the need to modify the framework protocol to send viewIds. Changes: - MouseCursor.activateSystemCursor(): Now sets cursor on 'element' instead of document.body - platform_dispatcher.dart: Iterate over all views instead of just the first one - Updated tests to verify cursor is set on the view element, not body
9c9b9c3 to
3c727e3
Compare

Fixes #140226
The mouse cursor was being set only on document.body, which caused two issues:
This change:
This approach was agreed upon in the issue discussion as the best solution, avoiding the need to modify the framework protocol to send viewIds.
Changes: