Opened 13 years ago

Closed 13 years ago

#10246 closed defect (fixed)

TabContainer: closing focused tab in IE 7 cause error

Reported by: dvdwalt Owned by: bill
Priority: high Milestone: 1.4
Component: Dijit Version: 1.4.0b
Keywords: Cc:
Blocked By: Blocking:



I'm using the sample code from Dojo Campus in the attached file, and added the closable: true attribute to the second and third tabs.

The code does the following:

  • Create one or more closable tabs through JavaScript code.

The problem in IE 7 is the following:

  • When a closable tag does not have focus and it is closed, it closes OK.
  • When a closable tab has focus and is closed in IE 7 I get an error message to the like of 'null' is null or not an object.
  • The tab is closed, but the focus is not turned to any tab in the container, one gets sort of a blank pane.
  • I suspect the other IE's will also have this problem.
  • As usual Firefox works fine :)!

Attachments (1)

tabs.html (1.6 KB) - added by dvdwalt 13 years ago.
Focused Closable Tab Error - Test in IE 7

Download all attachments as: .zip

Change History (3)

Changed 13 years ago by dvdwalt

Attachment: tabs.html added

Focused Closable Tab Error - Test in IE 7

comment:1 Changed 13 years ago by bill

Component: GeneralDijit
Milestone: tbd1.4
Owner: changed from anonymous to bill
Status: newassigned

Thanks for the detailed description / test case.

Looks like a regression starting with the scrolling tab container rewrite, although the actual bug is in the pre-rewrite old code. StackContainer?.removeChild() calls layout() before a new tab has been selected, which calls tablist.resize() --> _getScrollForSelectedTab(), which references the recently destroyed this._selectedTab.

comment:2 Changed 13 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [20707]) Clear this._selectedTab when the selected tab is deleted, in order to avoid referencing a deleted dom node. Fixes #10246 !strict.

Note: See TracTickets for help on using tickets.