Opened 7 years ago

Closed 7 years ago

#16334 closed defect (fixed)

[regression] Textarea: infinite loop after textarea gets scrollbar

Reported by: bill Owned by: Douglas Hays
Priority: undecided Milestone: 1.8.2
Component: Dijit - Form Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:


On FF16 (both Windows and Mac) the dijit/tests/form/robot/Textarea.html test is failing for me towards the end. Works in 1.7 and fails in 1.8.

It turns out the problem is an infinite loop caused when the Textarea inside the TabContainer gets a scrollbar. It starts with a scroll event, which triggers a call to _resizeLater(), which calls resize(), which then triggers another scroll event. Probably because resize() temporarily sets scrollTop to 0, and then back to its original value.

Doug said the scroll listener was there originally to handle Textarea expansion when the user pasted into the textarea using the mouse. (In this case there was no other notification that the textarea contents had changed.) It seems to no longer be needed.

In any case, either the scroll listener should be removed, or it should be changed to ignore bogus scroll events where nothing has really changed.

The dijit/tests/form/Textarea.html test failure for me started in [29530], although that root problem probably started earlier than that. Even if the test doesn't fail, you can still see the problem by adding a console.log() to _resizeLater().

Change History (2)

comment:1 Changed 7 years ago by Douglas Hays

Milestone: tbd1.8.2
Status: newassigned

comment:2 Changed 7 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

In [29956]:

Fixes #16334. Refs #15866, #15864. Remove onscroll event handler to avoid resize event loop.

Note: See TracTickets for help on using tickets.