-
Notifications
You must be signed in to change notification settings - Fork 40
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
Overset flag always true if textarea content height is greater than region height #28
Comments
Hi, Thank you for your kind words, I am currently spending very few time on my public work as I'm transitioning to a new life in the United States. I'm willing to have a look at this issue at some point, though, and something that would help me immensely is a webpage which shows the issue happening. Could you provide me this? Best regards, |
So I fixed the problem for myself by swapping out my textareas for divs when I initiate using the regions, which isn't ideal but it works. Just a question before I continue with this to see if this behavior is expected. Can textareas be split up? Text within divs can be split between different regions, but the problems I was experiencing seemed to come because the textareas were always treated as one unit that could not be split between regions. If textareas could be split between regions, that would solve the problem. |
You cannot split text areas. It is the expected behavior that those are not splitted. What is unexpected is that it seems like it is carried over and over. A real browser could split a I would still love to see a live webpage showcasing the problem, though. |
I will get that to you as soon as plausible, thanks for the explanation |
Great, thanks 👍 |
Okay, forgive me for not getting to this sooner. I've attached a self-contained html file that isolates the problem for my use case. Just put in a good portion of text into the textarea, enough to be greater than 11in, or 1056 pixels. If you open up the console. you'll see that regions are added indefinitely. |
And here's the whole text if it would be useful
|
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.
The text was updated successfully, but these errors were encountered: