-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
[Blazor] Fix WebView renderer not correctly dispatching browser events #49958
Conversation
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.
LGTM! Have we verified there aren't regressions in other APIs that fallback to RenderId=0?
@captainsafia Hopefully, all cases that fallback to a renderer ID of 0 have been eliminated. I've scanned the source for remaining cases, but it looks like they should all be addressed now. The root of the problem was that for one method, |
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.
I literally watched you make the fix, so I approve 😁
@@ -24,7 +24,7 @@ export function attachRootComponentToLogicalElement(browserRendererId: number, l | |||
browserRenderer.attachRootComponentToLogicalElement(componentId, logicalElement, appendContent); | |||
} | |||
|
|||
export function attachRootComponentToElement(elementSelector: string, componentId: number, browserRendererId?: number): void { | |||
export function attachRootComponentToElement(elementSelector: string, componentId: number, browserRendererId: number): void { |
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.
Since browserRenderId is now required could the fallback to 0 in line 47 be removed?
browserRendererId || 0
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.
Yeah, it could be. I can remove it the next time I touch this area, but feel free to open a PR if you feel inclined :)
Fix WebView renderer not correctly dispatching browser events
Fixes an issue where Blazor Hybrid throws an exception when a browser event gets emitted. This results in console errors upon user interaction.
Fixes dotnet/maui/issues/16609