-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Add pointerenter/leave to nonBubblingEvents #43542
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
Conversation
Thanks for your PR, @zHaytam. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Thanks for this, @zHaytam! I think we'd be happy to accept this PR if it also contained the relevant end-to-end (E2E) test cases for the new functionality. You could add E2E tests for Would you be interested in doing that? |
Yes, I can do that. I'll have that ready as soon as I can. |
I have added the test, but for some reason I can't run it on my machine: ../../../../../node_modules/@types/vfile/index.d.ts(11,31): error TS2792: Cannot find module 'vfile-message'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' opti
on? [D:\Projects\aspnetcore\src\JSInterop\Microsoft.JSInterop.JS\src\Microsoft.JSInterop.JS.npmproj]
../../../../../node_modules/@types/webpack-sources/index.d.ts(10,62): error TS2792: Cannot find module 'source-map'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'path
s' option? [D:\Projects\aspnetcore\src\JSInterop\Microsoft.JSInterop.JS\src\Microsoft.JSInterop.JS.npmproj]
D:\Projects\aspnetcore\eng\targets\Npm.Common.targets(82,5): error : Command failed with exit code 1. [D:\Projects\aspnetcore\src\JSInterop\Microsoft.JSInterop.JS\src\Microsoft.JSInterop.JS.npmproj] |
@Pilchie Can we consider this one for RC2? |
Approved for .NET 7 RC2. Thanks for the contribution @zHaytam! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I need to make sure blazor.server.js
and blazor.webview.js
are updated before merging this.
@zHaytam No further action is needed from you - I'll sort this out. Thanks for the contribution!
I'm glad this got approved but did the unit tests run? I still can't manage to run them locally so I would hate to contribute something not working... |
@zHaytam Yes, the CI system did run your new |
ffb761d
to
d1cfd40
Compare
d1cfd40
to
86672b1
Compare
@Pilchie @mkArtakMSFT Could either of you merge this, assuming the build passes and the most recent commit in this PR is still 5fc4102? That's the commit I've approved. The change was approved for RC2 by Kevin above. I don't have permission to merge to |
Done - this is the right branch, it just has our default release branch protection rules. |
(This is @SteveSandersonMS hijacking the PR description to add our servicing template so it can be considered for .NET 7 RC2)
Add pointerenter/leave to nonBubblingEvents
Blazor supports all pointer events except for
pointerenter
andpointerleave
. This adds support for those too.Description
The only reason why
pointerenter
andpointerleave
don't already work is that they are nonbubbling events, and we haven't included them in the list of nonbubbling events. Blazor needs to know about which events are nonbubbling because the way they are captured and dispatched into .NET is slightly different than for bubbling events.This PR just adds those events to the nonbubbling list so they start working.
Fixes #43129
Customer Impact
Without this fix, developers can't use the
pointerenter
andpointerleave
events. They have to use the oldermouseover
andmouseout
events which don't support such a wide range of devices and in many cases don't have the desired modern semantics for overlapping elements.Regression?
[If yes, specify the version the behavior has regressed from]
Risk
Low because it's just adding two new event names to the list of nonbubbling events. It should only affect the behavior for those two events, which was already broken in the past and now should stop being broken. No other behaviors/events should be affected.
Verification
Packaging changes reviewed?
Original PR description by @zHaytam:
The events
pointerenter
andpointerleave
are the only two pointer events that don't work. This is because they don't bubble and as such, we need to setuseCapture
totrue
, which is done whennonBubblingEvents
contains the event. Basically, they need to behave the same way asmouseenter
andmouseleave
.Fixes #43129