Textarea in a container of a small width causes lag when resizing browser or copying text into the textarea




7 years ago
4 years ago


(Reporter: jayden, Unassigned)


(Depends on: 1 bug, {perf})

Windows 7
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)



(2 attachments)



7 years ago
Created attachment 554449 [details]

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0
Build ID: 20110615151330

Steps to reproduce:

We have a site with a YUI 2 tabview and a textarea with lots of text.

Actual results:

If you load the page to a tab where the textarea is on a non active tab the browser lags.
If you load the page to the tab with the textarea the browser doesn't lag.

Expected results:

It would be nice if you didn't have to sit for some time with your browser being completely unresponsive.

Comment 1

7 years ago
This lag occurs in Firefox 3.6, 5, 6, and 7.

The lag seems to take longer based on the amount of text in the textarea.

With my testcase:
Resize the browser so it is fullscreen.
Now click each button and view the time it takes to copy the text to the textareas.
The default and 50% width (depending on your screen resolution) should copy instantly with no lag.
The other 2 will say they copied in the same rough number of milliseconds but the browser will become unresponsive for a bit during the process.

If you resize your browser from smaller to larger with all the text in the textareas it can also lag.

I tried and it doesn't matter if you are pasting text in the textarea or if the javascript is doing it.

Looks like it could be an issue with the number of wrapped lines in the textarea or perhaps the width.
Version: 5 Branch → 7 Branch

Comment 2

7 years ago
Well, I found a change that you can do to yuis css to remove this lag.  The hidden tabs have the following css:

yui-navset .yui-content .yui-hidden {
    border: 0 none;
    height: 0;
    left: -999999px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    visibility: hidden;
    width: 0;

If you add this as an overriding css rule it solves the issue in yui.  It however is still an issue with firefox.

.yui-navset .yui-content .yui-hidden {
  width: 1000px;
  height: 100px;
Attachment #554449 - Attachment mime type: text/plain → text/html
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Version: 7 Branch → Trunk
Created attachment 554751 [details]
WinDbg Log

Confirmed the Differences Of Lagtime on the Testcase with Mozilla/5.0 (Windows NT 5.1; rv:9.0a1) Gecko/20110821 Firefox/9.0a1 ID:20110821030758

Attached a WinDbg Log in Case it helps. Ran this against the "0 Width Case" since it has the longest Lagtime for me.
Summary: Testarea in a container of a small width causes lag when resizing browser or copying text into the textarea → Textarea in a container of a small width causes lag when resizing browser or copying text into the textarea

Comment 4

7 years ago
Similar to Bug 667412
Yeah, we should retest here when that's fixed.
Depends on: 667412
Actually, should retest after bug 561578 and/or bug 682051 are fixed.
Depends on: 561578, 682051
No longer depends on: 667412

Comment 7

7 years ago
For me, all cases seem to take 1-2 milliseconds...


7 years ago
Keywords: perf
You need to log in before you can comment on or make changes to this bug.