Reputation:
I have a textarea with overflow-x: auto; attributed to it. It works great when a user is typing text into the box by hand. When a user copy pastes a line from a file, however, that is bigger than my textarea, the overflow-x property does not work, instead the textarea wordwraps the long line.
Is there a way (maybe javascript) to make overflow-x work on copy-paste?
Thanks.
Upvotes: 1
Views: 1353
Reputation: 32335
I'm not sure what you are trying to achieve - is that for the text area to automatically expand when user types text in? I couldn't create such a behavior using just HTML and CSS.
You can theoretically set your textarea wrap attribute to "no" which will force the creating of a horizontal scrollbar when users type in or paste in long lines.
Upvotes: 2
Reputation: 6028
From the looks of it, it would seem that the text comes pre-wordwrapped from the editor. What editor are you using, and on which platform are you experiencing this behaviour?
Upvotes: 0