Skip to content

HammerModule does not work when imported before BrowserModule #37149

Closed

Description

@literalpie

🐞 bug report

Affected Package

This issue affects: @angular/platform-browser

Is this a regression?

This issue exists in version 9.0 and 9.1.7. The HammerModule did not exist before 9.0.

Description

A clear and concise description of the problem...

If the HammerModule is imported before BrowserModule and BrowserAnimationsModule, it seems to have no effect.

🔬 Minimal Reproduction

stackblitz - notice that panning in the box does not log anything if HammerModule is imported before BrowserModule. If the order is switched, the component logs as expected.

🌍 Your Environment

Angular Version:


Angular CLI: 9.1.6
Node: 12.16.3
OS: darwin x64

Angular: 9.1.7
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.6
@angular-devkit/build-angular     0.901.6
@angular-devkit/build-optimizer   0.901.6
@angular-devkit/build-webpack     0.901.6
@angular-devkit/core              9.1.6
@angular-devkit/schematics        9.1.6
@angular/cdk                      9.2.2
@angular/cli                      9.1.6
@angular/fire                     6.0.0
@angular/flex-layout              9.0.0-beta.29
@angular/material                 9.2.3
@ngtools/webpack                  9.1.6
@schematics/angular               9.1.6
@schematics/update                0.901.6
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.42.0

Anything else relevant?
I was unable to find any documentation about this requirement when importing HammerModule, so I assume it is a bug. If it's expected, a simple documentation addition may be enough!

Activity

  1. added
    area: core
    on May 16, 2020
  2. added this to the needsTriage milestone on May 16, 2020
  3. modified the milestones: needsTriage, Backlog on May 20, 2020
  4. 22 remaining items

  5. added 12 commits that reference this issue on Sep 24, 2025
    bd5e4f4
    290912a
    7d489ec
    dc7be96
    23a4c5c
    9447fba
    54e42f7
    9907f77
    621f97e
    9b34781
    45784dc
    d0d16c7
  6. added a commit that references this issue on Oct 15, 2025
    4170765
  7. added 2 commits that reference this issue on Oct 15, 2025
    2ece428
    29c397f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4area: corecore: event listenersfreq2: mediumstate: confirmedtype: bug/fix

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions