Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#9699 closed defect (fixed)

scrollIntoView() memory leaks

Reported by: bill Owned by: Douglas Hays
Priority: high Milestone: 1.4
Component: Dijit Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:

Description

It's bad to set properties direction on a !DOMNode's JS object, like scrollIntoView() is doing:

element._borderStart = { H:(isIE8strict && !ltr)? (bp.w-bp.l):bp.l, V:bp.t };
element._borderSize = { H:bp.w, V:bp.h };
element._scrolledAmount = { H:element.scrollLeft, V:element.scrollTop };
element._offsetSize = { H: element._offsetWidth||element.offsetWidth, V: element._offsetHeight||element.offsetHeight };

It causes memory leaks on IE if they aren't cleaned up properly, and I think they aren't being cleaned up, or at least they are still around after scrollIntoView() returns. I can see them in DOM explorer on IE7 on the tabStripButton nodes in test_tabContainer.html.

See #9614.

Change History (4)

comment:1 Changed 10 years ago by Douglas Hays

Milestone: tbd1.4

comment:2 Changed 10 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

(In [19915]) Fixes #9699. References #8456. Refactor scrollIntoView to use the new dojo.position. Remove most browser-specific workarounds. Add support for position:fixed. !strict

comment:3 Changed 10 years ago by liucougar

(In [20087]) refs #9699: simplified code a little bit !strict

comment:4 Changed 10 years ago by Douglas Hays

(In [20207]) References #9699 !strict. Change local var from b to bot to avoid collision with elPos with statement.

Note: See TracTickets for help on using tickets.