diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/ComponentResources.resx b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/ComponentResources.resx index 965fe99190..b457a1f9f7 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/ComponentResources.resx +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/ComponentResources.resx @@ -163,7 +163,7 @@ Sets the '{0}' attribute to the provided string or delegate value. A delegate value should be of type '{1}'. - Specifies whether to cancel(if cancelable) the default action that belongs to the '{0}' event. + Specifies whether to cancel (if cancelable) the default action that belongs to the '{0}' event. Specifies whether to prevent further propagation of the '{0}' event in the capturing and bubbling phases. diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentDiagnosticFactory.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentDiagnosticFactory.cs index c179ab8d17..0aa49c6446 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentDiagnosticFactory.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentDiagnosticFactory.cs @@ -149,7 +149,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components public static readonly RazorDiagnosticDescriptor EventHandler_Duplicates = new RazorDiagnosticDescriptor( $"{DiagnosticPrefix}9990", - () => "The attribute '{0}' was matched by multiple event handlers attributes. Duplicates:{1}", + () => "The attribute '{0}' was matched by multiple event handler attributes. Duplicates:{1}", RazorDiagnosticSeverity.Error); public static RazorDiagnostic CreateEventHandler_Duplicates(SourceSpan? source, string attribute, TagHelperDirectiveAttributeIntermediateNode[] attributes) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentEventHandlerLoweringPass.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentEventHandlerLoweringPass.cs index 421b51c819..2e72dfe397 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentEventHandlerLoweringPass.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentEventHandlerLoweringPass.cs @@ -32,13 +32,14 @@ namespace Microsoft.AspNetCore.Razor.Language.Components // Each usage will be represented by a tag helper property that is a descendant of either // a component or element. var references = documentNode.FindDescendantReferences(); - var parameterReferences = documentNode.FindDescendantReferences(); - var parents = new HashSet(); for (var i = 0; i < references.Count; i++) { parents.Add(references[i].Parent); } + + // We need to do something similar for directive attribute parameters like @onclick:preventDefault. + var parameterReferences = documentNode.FindDescendantReferences(); for (var i = 0; i < parameterReferences.Count; i++) { parents.Add(parameterReferences[i].Parent);