Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1449 closed defect (fixed)

[patch][cla] Layout manager overwrites element overflow settings

Reported by: koreth@… Owned by: Douglas Hays
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: Cc: koreth@…, doughays@…, peller@…
Blocked By: Blocking:

Description

The layout manager was recently changed such that it overwrites the "overflow" style on all the child elements on a page, setting them to "visible". That breaks pages that set other overflow styles (e.g. to create scrolling divs).

Fix:

Index: src/widget/html/layout.js =================================================================== --- src/widget/html/layout.js (revision 5680) +++ src/widget/html/layout.js (working copy) @@ -55,6 +55,7 @@

dojo.lang.forEach(children, function(child){

var elm=child.domNode; var pos=child.layoutAlign;

+ var oldOverflow=elm.style.overflow;

set elem to upper left corner of unused space; may move it later with(elm.style){

left = f.left+"px";

@@ -96,6 +97,9 @@

if(child.onResized){

child.onResized();

}

+ + Undo the override of the overflow setting above + elm.style.overflow = oldOverflow;

});

};

Attachments (1)

1449.patch (838 bytes) - added by Douglas Hays 13 years ago.
explicitly set width for firefox

Download all attachments as: .zip

Change History (9)

comment:1 Changed 13 years ago by guest

Let's try that again.

Index: src/widget/html/layout.js
===================================================================
--- src/widget/html/layout.js   (revision 5680)
+++ src/widget/html/layout.js   (working copy)
@@ -55,6 +55,7 @@
        dojo.lang.forEach(children, function(child){
                var elm=child.domNode;
                var pos=child.layoutAlign;
+               var oldOverflow=elm.style.overflow;
                // set elem to upper left corner of unused space; may move it la
ter
                with(elm.style){
                        left = f.left+"px";
@@ -96,6 +97,9 @@
                if(child.onResized){
                        child.onResized();
                }
+
+               // Undo the override of the overflow setting above
+               elm.style.overflow = oldOverflow;
        });
 };

comment:2 Changed 13 years ago by Douglas Hays

This workaround should not be used since it recreates the problem described in #941 on Firefox.

comment:3 Changed 13 years ago by guest

Owner: changed from bill to Douglas Hays

Changed 13 years ago by Douglas Hays

Attachment: 1449.patch added

explicitly set width for firefox

comment:4 Changed 13 years ago by Douglas Hays

Cc: koreth@… doughays@… peller@… added

Please verify with the attached patch.

comment:5 Changed 13 years ago by dylan

Milestone: 0.4
Summary: Layout manager overwrites element overflow settings[patch][cla] Layout manager overwrites element overflow settings
Version: 0.20.3

comment:6 Changed 13 years ago by bill

I checked in Doug's patch, but now the TabContainer? tests (with tabs on left or right side) don't work. Also it seems like dojo.html.setMarginBox(foo, {height: 20}) should work even if you don't specify a width, so I'd like to look into that more.

comment:7 Changed 13 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

TabContainer? seems to be working now in the latest trunk

comment:8 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.