Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1219 closed defect (fixed)

"onClose" event is not invoked when I close a "dynamically created Tab" - (both in IE & Mozzila)

Reported by: kmondal@… Owned by: bill
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

Hi Gurus, I am using Dojo since last 1 month. My goal is to create a tab dynamically and when user will close the tab, I have to process something as part of tab's close event. The related code is listed below:

. . .

function testClose(pane,tab) {

return confirm("Please confirm that you want tab "+tab.label+" closed");

} . . . .

var tabTitle = "A CLOSABLE TAB";

var tabContainer = dojo.widget.byId('mainTabContainer');

var newTab = dojo.widget.createWidget("ContentPane?", {id:"Tab 11", label:tabTitle, onClose:"testClose" });

tabContainer.closeButton="tab";

tabContainer.addChild(newTab);

tabContainer.selectTab(newTab);

. .

My problem is: the testClose() function does never get called at all !! Same thing happens in IE & Mozzila.

Any help will be highly appreciated.

Thanx, Kuntal

Attachments (1)

t.html (1.1 KB) - added by bill 13 years ago.
test case

Download all attachments as: .zip

Change History (7)

comment:1 Changed 13 years ago by guest

Summary: onClose event is not invoked when I create a Tab dynamically (both in IE & Mozzila)"onClose" event is not invoked when I close a "dynamically created Tab" - (both in IE & Mozzila)

comment:2 Changed 13 years ago by dylan

Milestone: 0.5
Priority: highnormal

comment:3 Changed 13 years ago by dylan

Component: CoreWidgets
Owner: changed from anonymous to bill

Changed 13 years ago by bill

Attachment: t.html added

test case

comment:4 Changed 13 years ago by bill

Milestone: 0.50.4

Ah yes, _runOnCloseTab() was referencing onClose via extraArgs, which doesn't work form the programatic case.

comment:5 Changed 13 years ago by bill

Resolution: fixed
Status: newclosed

(In [5864]) Fix closing programatically created tabs. Fixes #1219.

comment:6 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.