Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15864 closed defect (fixed)

ExpandingTextAreaMixin: resize should be from startup(), not postCreate()

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

Description (last modified by bill)

ExpandingTextAreaMixin.js does resizing from postCreate(), but the widget may not be attached to the DOM at that point. It should be from startup().

Admittedly often the widget is attached to the DOM in postCreate(), and it's almost always attached to the DOM after a setTimeout(..., 0), but this is not guaranteed.

Also, having a _resizeLater() method (rather than just calling resize()) may be unnecessary after moving the resize calls to startup().

Attaching patch to move the resize() calls, plus to use on() rather than this.connect(), since the latter will probably go away for 2.0.

Attachments (1)

eta.patch (1.3 KB) - added by bill 7 years ago.

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by bill

Attachment: eta.patch added

comment:1 Changed 7 years ago by bill

Description: modified (diff)

comment:2 Changed 7 years ago by Douglas Hays

Milestone: tbd1.8.1
Status: newassigned

comment:3 Changed 7 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

In [29530]:

Fixes #15864, #15866. Remove textarea.onresize event trap since the Viewport.on/resize handles this effectively to avoid a resize loop.

comment:4 Changed 7 years ago by Douglas Hays

In [29956]:

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

Note: See TracTickets for help on using tickets.