Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Sep 7, 2025. It is now read-only.
This repository was archived by the owner on Sep 7, 2025. It is now read-only.

[issue]autosize after changing padding #404

@FlashTang

Description

@FlashTang
this.textArea!.style.paddingLeft ="50px";
this.textArea!.style.paddingTop = "50px";
this.textArea!.style.paddingRight =  "50px";
this.textArea!.style.paddingBottom = "50px";

autosize(this.textArea!); // works fine

this.textArea!.style.paddingLeft ="100px";
this.textArea!.style.paddingTop = "100px";
this.textArea!.style.paddingRight =  "100px";
this.textArea!.style.paddingBottom = "100px";

autosize.update(this.textArea!); // wrong height .100px more than correct

the solution  for now I found is set padding to 50px (original padding after autosize init)
then autosize.update(this.textArea!); // correct
then  set padding back to 100px

is there a way to fix this without switching padding ?

like : autosize.autoSwitchPaddings = true; // so this will not break the original behave (unless set this line)

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions