Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#1952 closed defect (fixed)

LayoutContainer inside TabContainer causes fatal error

Reported by: joose Owned by: bill
Priority: high Milestone:
Component: Widgets Version: 0.4
Keywords: LayoutContainer, TabContainer, layout.js, widget/html/layout.js Cc:
Blocked By: Blocking:

Description for code to test it, also here is the important markup:

   <div dojoType="TabContainer" id="tabc" style="width: 500px; height: 500px;">
     <div dojoType="LayoutContainer" label="do not delete me" closable="true">
      <div dojoType="ContentPane" layoutAlign="client">here</div>
     <div dojoType="ContentPane" label="close me!" closable="true">Close me</div>

When closing tab with label "close me!" -> happens error in src/widget/html/layout.js on line 63 according to opera.

This error happens with every browser I tested (IE6, FF, Safari nightly and Opera)

Dojo version is latest trunk.

Attachments (1)

pagecontainer.patch (744 bytes) - added by joose 16 years ago.
this is one way to solve this problem.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 16 years ago by joose

Seems like my simplified test-case only fails on Safari now.. I'm trying to make new test case that works on FF too.

comment:2 Changed 16 years ago by joose

Seems like I found another bug when trying to create test case for my original bug. But, let's make this a new bug.

This test case, does not work on Opera/Safari?. Cause: Opera & Safari does 2 events in one click and IE & FF does not. Problem: Opera & Safari tries to select Tab which is deleted -> error Solution: when handling onClick event in PageContainer?, make sure that we are not deleting that page currently. Simple if should be enough.

Changed 16 years ago by joose

Attachment: pagecontainer.patch added

this is one way to solve this problem.

comment:3 Changed 16 years ago by bill

Resolution: fixed
Status: newclosed

(In [6665]) Fixes #1952. On Safari (at least), clicking the close button also generates an onClick event on the tab select "button". Prevent that.

comment:4 Changed 15 years ago by (none)

Milestone: 0.4.1

Milestone 0.4.1 deleted

Note: See TracTickets for help on using tickets.