Skip to content

Overset flag always true if textarea content height is greater than region height #28

Open
@lastmjs

Description

Amazing polyfill by the way, I'm using it to print headers and footers in Chrome, which to my knowledge hasn't been possible before because of a bug in Chrome.

I am listening to the regionoversetchange event to dynamically add as many regions as my content needs. In my listener callback function, if e.target.overset is true then I create a new region (must be a fixed height) and add any remaining content to it. This repeats until there is no more remaining content, which I know if e.target.overset is false. This works fine with all of my html, except for textareas that have a content height greater than the height of the region they are being put into. In this case it seems that e.target.overset is always true, and the listener callback is called indefinitely.

I believe this is happening because the textarea elements themselves aren't actually being split up, and so when you take a textarea that won't fit into a region and then stick it into another region with the same height as the first region, nothing really changes, and e.target.overset is always true.

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