Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#7160 closed defect (fixed)

BorderContainer: problems setting custom class

Reported by: taras Owned by:
Priority: low Milestone: 1.2
Component: Dijit Version: 1.1.1
Keywords: Cc:
Blocked By: Blocking:

Description

Hi

Tested in FF2.

After the 11/7 release the most outer BorderContainer? has problems in size when :

[1] the size is defined in percentage (ex: style="height:100%; width: 100%;")

[2] if class="anyclass" attribute is defined, even if dimensions in the style attribute are defined in absolute numbers (ex:class="pepe"

style="height:800px; width: 100%;"

The behaviour in the 10/7/2008 nightly build was:

[3] dimensions in style attribute can be given in percentage, if an only if a class attribute is defined (ex: class="any even no existent class")

The (required) behaviour must be: dimensions can be defined in percentage, definition of a 'class' attribute will not crash the border container.

In my attached example:

[1] change the line:

<div dojoType="dijit.layout.BorderContainer?" id="allScreen" design="headline" style="height:800px; width: 100%;">

to

<div dojoType="dijit.layout.BorderContainer?" id="allScreen" design="headline" class="anyclass" style="height:800px; width: 100%;">

See results (incorrect display)...

[2]change the line:

<div dojoType="dijit.layout.BorderContainer?" id="allScreen" design="headline" style="height:800px; width: 100%;">

to

<div dojoType="dijit.layout.BorderContainer?" id="allScreen" design="headline" style="height:100%; width: 100%;">

see results (incorrect display)...

thanks

Attachments (1)

borderContainer-test.html (4.2 KB) - added by taras 11 years ago.
Test File that demonstrate the problem

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by taras

Attachment: borderContainer-test.html added

Test File that demonstrate the problem

comment:1 Changed 11 years ago by taras

Additional:

In test: test_BorderContainer_complex.html

change line:

<div dojoType="dijit.layout.BorderContainer?"

style="border: 2px solid black; width: 90%; height: 500px; padding: 10px;">

to

<div dojoType="dijit.layout.BorderContainer?"

style="border: 2px solid black; width: 90%; height: 100%; padding: 10px;">

The result is catastrophic

comment:2 Changed 11 years ago by taras

It seems to me that this problem may be related to the work done in : Ticket #7149

comment:3 Changed 11 years ago by bill

Priority: highlow
severity: criticalminor
Summary: Weird Behaviour of BorderContainer since nightly build: 11/0/2007BorderContainer: problems setting custom class

I assume that by 11/0/2007 you really mean 7/11/2008 (July 11 2008). !If you change the class of BorderContainer it's expected to stop working because dijit.css contains critical CSS rules for dijitBorderContainer and dijitBorderContainerNoGutter.

I suppose you want BorderContainer to have the same CSS as before (or at least, the same critical CSS like position:relative), but just override theme settings like border color. However, the code isn't setup to work that way. You could have a CSS rule based on id to do that, or an inline style. Not sure what to do beyond that.

comment:4 Changed 11 years ago by taras

Ok Bill.

Now I understand. From my part you can close this PR.

Eduardo

comment:5 Changed 11 years ago by bill

Resolution: wontfix
Status: newclosed

OK. Then I'll close this for now and if we do think of a way to support this functionality will open a new ticket. (It's nothing in particular to BorderContainer, all the layout widgets and I think the other widgets too share this problem.)

comment:6 Changed 11 years ago by bill

Milestone: tbd1.2
Resolution: wontfix
Status: closedreopened

Going to change the layout widgets so that class is additive, not destructive. (IE, setting class="foo" adds "foo" to existing dijitBorderContainer class).

comment:7 Changed 11 years ago by bill

Resolution: fixed
Status: reopenedclosed

(In [14624]) Change the layout widgets so that class is additive, not destructive. (IE, setting class="foo" adds "foo" to existing dijitBorderContainer class). Fixes #7160, #7315 !strict

comment:8 Changed 11 years ago by bill

(In [14625]) Remove unneeded and incorrect comments, refs #7160 !strict

Note: See TracTickets for help on using tickets.