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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style.top offset is NaN when HTMLInputElement line-height is set to 'normal' #202

Open
gtomaszczyk opened this issue Feb 10, 2022 · 0 comments

Comments

@gtomaszczyk
Copy link

gtomaszczyk commented Feb 10, 2022

private getBlockCursorDimensions(nativeParentElement: HTMLInputElement) {
const parentStyles = window.getComputedStyle(nativeParentElement);
return {
height: parseFloat(parentStyles.lineHeight),
width: parseFloat(parentStyles.fontSize)
};
}
}

@gtomaszczyk gtomaszczyk changed the title style.top offset is NaN when input/textarea element line-height is set to 'normal' style.top offset is NaN when HTMLInputElement line-height is set to 'normal' Feb 10, 2022
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

No branches or pull requests

1 participant