Large text in TextArea freezes computer

后端 未结 5 2026
无人共我
无人共我 2020-12-20 19:09

When I try to set the value of a textarea with a large text (for example a string length of 600000), the browser (Firefox 3.5.3) freezes.

The text is in 1 line so t

5条回答
  •  隐瞒了意图╮
    2020-12-20 19:37

    The maximum size for a textarea in Firefox is 64K (it could be just 32K, I can't recall). 600,000 characters is larger than that. If the size of the text that you're pasting into the textarea does in fact exceed that size, then there's nothing you can do about it.

    Of course, one alternative would be to put some type of restriction on the data going into the field and then give the user some feedback as to why their data won't fit.

提交回复
热议问题