Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

util: getParentWithPointerEvents > hasComputedStyle causes forced reflow #12098

Open
aman-kumayu opened this issue May 17, 2021 · 0 comments
Open
Labels
P3: important Important issues that really should be fixed when possible. type: bug type: performance This issue is related to performance
Milestone

Comments

@aman-kumayu
Copy link

aman-kumayu commented May 17, 2021

AngularJS Material is in LTS mode

We are no longer accepting changes that are not critical bug fixes into this project.
See Long Term Support for more detail.

Bug Report

Explain the expected behavior

Angular material forces browser to recalculate style whenever new element is added in the dom, it should read first then write.

Explain the current behavior

Angular Material is calling function getParentWithPointerEvents > hasComputedStyle from $mdUtil which is forcing browser to recalculate style, due to which i am facing a performance lag in the system.

Discuss the use-case or motivation for changing the existing behavior

The read operation i.e. recalculate style must be done before altering DOM.

List the affected versions of AngularJS, Material, OS, and browsers

  • AngularJS: 1.5.8
  • AngularJS Material: 1.1.1
  • OS: Any
  • Browsers: Chromium 90.0.4430.72.

Screenshots

angular-material
angular-material-js

@aman-kumayu aman-kumayu added needs triage Issues that need initial triage type: bug labels May 17, 2021
@Splaktar Splaktar added type: performance This issue is related to performance P3: important Important issues that really should be fixed when possible. labels May 21, 2021
@Splaktar Splaktar changed the title Forced Reflow in angular material js util: getParentWithPointerEvents > hasComputedStyle causes forced reflow May 21, 2021
@Splaktar Splaktar removed the needs triage Issues that need initial triage label May 21, 2021
@Splaktar Splaktar added this to the - Backlog milestone May 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3: important Important issues that really should be fixed when possible. type: bug type: performance This issue is related to performance
Projects
None yet
Development

No branches or pull requests

2 participants