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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directive matching with attr. is not working with Ivy #38512

Open
cjmincey opened this issue Aug 18, 2020 · 1 comment
Open

Directive matching with attr. is not working with Ivy #38512

cjmincey opened this issue Aug 18, 2020 · 1 comment
Labels
area: compiler Issues related to `ngc`, Angular's template compiler area: core Issues related to the framework runtime core: directive matching P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent state: confirmed
Milestone

Comments

@cjmincey
Copy link

cjmincey commented Aug 18, 2020

馃悶 bug report

Affected Package

The issue affects the @angular/core/Directive when Ivy is enabled on the project.

Is this a regression?

Yes, the previous version in which this bug was not present was: 7.2.15. When Ivy is disabled in Angular 9.x and 10.x the issue is also not present.

Description

We have a directive with two selectors [data-dl],[attr.data-dl] that creates a mousedown event on the HTML element. When Ivy is enabled on the project, the attr.data-dl version of the directive does not properly fire the mousedown event while just data-dl does fire correctly.

馃敩 Minimal Reproduction

Right click on the links in the projects below to see the message being logged to the console.

馃敟 Exception or Error

No Exception

馃實 Your Environment

Angular Version:
9.1.12

Anything else relevant?

Seems to be broken uniformly across all browsers and operating systems from what we have seen.

@atscott atscott added the area: core Issues related to the framework runtime label Aug 18, 2020
@ngbot ngbot bot added this to the needsTriage milestone Aug 18, 2020
@atscott atscott added the area: compiler Issues related to `ngc`, Angular's template compiler label Oct 20, 2020
@atscott atscott changed the title Attribute Binding with attr. is not working with Ivy Directive matching with attr. is not working with Ivy Oct 20, 2020
@atscott atscott added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent state: confirmed labels Oct 20, 2020
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Oct 20, 2020
@atscott
Copy link
Contributor

atscott commented Oct 20, 2020

The issue here is that the directive isn't even getting matched. I think the attr. selector really should never match (it does in VE/pre-Ivy), but I also think it was probably added because the regular selector didn't match as would be expected. I think the fix here should be that if there is an attr.data-dl, it should match a directive with a selector [data-dl].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: compiler Issues related to `ngc`, Angular's template compiler area: core Issues related to the framework runtime core: directive matching P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent state: confirmed
Projects
None yet
Development

No branches or pull requests

5 participants