Sitelet https://github.com/angular/angular/pull/50394
Skip to content

fix(platform-browser): DomEventsPlugin should always be the last plugin to be called for supports(). - #50394

Closed
JeanMeche wants to merge 1 commit into
angular:mainfrom
JeanMeche:fix/event-manager-plugins-order
Closed

JeanMeche wants to merge 1 commit into
angular:mainfrom
JeanMeche:fix/event-manager-plugins-order

Conversation

@JeanMeche

Copy link
Copy Markdown
Member

This fixes the issues when BrowserModule is not the first module imported.

I choose not to introduce a specific token for the DomEventsPlugin as this would likely be breaking.

Fixes #37149 #37850

PR Type

What kind of change does this PR introduce?

  • Bugfix

Does this PR introduce a breaking change?

  • No

@JeanMeche
JeanMeche force-pushed the fix/event-manager-plugins-order branch 2 times, most recently from f223c82 to 60a97de Compare May 21, 2023 12:46
Comment thread packages/platform-browser/src/dom/events/interface.ts Outdated
@JeanMeche
JeanMeche force-pushed the fix/event-manager-plugins-order branch 2 times, most recently from 57065c6 to fdab3b4 Compare May 21, 2023 13:06
@JeanMeche
JeanMeche marked this pull request as ready for review May 21, 2023 13:06
@pullapprove
pullapprove Bot requested a review from alxhub May 21, 2023 13:06
@JeanMeche
JeanMeche force-pushed the fix/event-manager-plugins-order branch from fdab3b4 to 9290de1 Compare May 21, 2023 13:25
@jessicajaniuk jessicajaniuk added action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release labels May 22, 2023
@ngbot ngbot Bot modified the milestone: Backlog May 22, 2023
@jessicajaniuk jessicajaniuk added action: review The PR is still awaiting reviews from at least one requested reviewer and removed action: merge The PR is ready for merge by the caretaker labels May 22, 2023
Comment thread packages/platform-browser/src/dom/events/interface.ts Outdated
Comment thread packages/platform-browser/src/dom/events/event_manager.ts Outdated
@JeanMeche
JeanMeche force-pushed the fix/event-manager-plugins-order branch 5 times, most recently from 623f32e to 8edee8b Compare June 9, 2023 22:40
@JeanMeche
JeanMeche requested a review from alxhub June 9, 2023 22:58
Comment thread packages/platform-browser/src/dom/events/interface.ts Outdated
Comment thread packages/platform-browser/src/dom/events/event_manager.ts Outdated
alxhub
alxhub previously requested changes Jun 12, 2023

@alxhub alxhub left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the g3 failures, it looks like g3 expects to import EventManagerPlugin from the event_manager.ts file. We could update g3 when we land this change, but I don't think there's a reason to separate EventManagerPlugin into a separate file anymore - how would you feel about keeping it in event_manager.ts?

@JeanMeche
JeanMeche force-pushed the fix/event-manager-plugins-order branch from 8edee8b to beaca5d Compare June 13, 2023 05:14
@JeanMeche

Copy link
Copy Markdown
Member Author

It makes sense, we're down to 3 changed files.

@JeanMeche JeanMeche added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 30, 2025
@JeanMeche

Copy link
Copy Markdown
Member Author

The current change ended up breaking at least one app inside Google. Currently investigating a bit why.

@JeanMeche
JeanMeche marked this pull request as draft September 30, 2025 23:30
@JeanMeche
JeanMeche force-pushed the fix/event-manager-plugins-order branch 9 times, most recently from 45784dc to d0d16c7 Compare October 4, 2025 15:15
@JeanMeche

Copy link
Copy Markdown
Member Author

I reverted to using instanceof DomEventPlugin and moving EventManagerPlugin to a separated file.
TLDR: Having a dedicated isDomEventPlugin didn't work once it when through the closure compiler optimisations.

Running a TGP to make sure we're good to go.

@JeanMeche
JeanMeche marked this pull request as ready for review October 4, 2025 15:51
@JeanMeche JeanMeche added action: global presubmit The PR is in need of a google3 global presubmit action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews action: global presubmit The PR is in need of a google3 global presubmit labels Oct 4, 2025
@JeanMeche

Copy link
Copy Markdown
Member Author

TGP is green

@JeanMeche JeanMeche removed the action: merge The PR is ready for merge by the caretaker label Oct 4, 2025
@JeanMeche

Copy link
Copy Markdown
Member Author

Removing the merge label, this change still needs an approval

@thePunderWoman thePunderWoman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JeanMeche JeanMeche added the action: merge The PR is ready for merge by the caretaker label Oct 14, 2025
…ugin to be called for `supports()`.

This fixes the issues when `BrowserModule` is not the first module imported.

Fixes angular#37149 angular#37850
@JeanMeche
JeanMeche force-pushed the fix/event-manager-plugins-order branch from d0d16c7 to 4170765 Compare October 15, 2025 08:48
thePunderWoman pushed a commit that referenced this pull request Oct 15, 2025
…ugin to be called for `supports()`. (#50394)

This fixes the issues when `BrowserModule` is not the first module imported.

Fixes #37149 #37850

PR Close #50394
@thePunderWoman

Copy link
Copy Markdown
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

@JeanMeche
JeanMeche deleted the fix/event-manager-plugins-order branch October 16, 2025 12:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HammerModule does not work when imported before BrowserModule

5 participants