Skip to content

Conversation

@mhassman
Copy link

getComputedStyle(element, 'line-height') was returning 'normal' thus NaN and placing the .top position incorrectly at zero. Fixed by defaulting to font-height if line-height isn't numeric.

getComputedStyle(element, 'line-height') was returning 'normal' thus NaN and placing the .top position incorrectly at zero. Fixed by defaulting to font-height if line-height isn't numeric.
@avcs06
Copy link
Owner

avcs06 commented Jul 19, 2021

@mhassman getComputedStyle method is costly and you are calling it twice, please store it in a variable and reuse it

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants