Ticket #5389 (closed defect: fixed)
dojox.layout.ScrollPane fails with Internet Explorer. Here is a patch.
| Reported by: | guest | Owned by: | dante |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1 |
| Component: | Dojox | Version: | 1.0 |
| Severity: | normal | Keywords: | |
| Cc: | daniel.carrera@… |
Description
The problem occurred in IE when building dojox.layout.ScrollPane programmatically. For reference, I include my sources at the end of this post.
Symptoms: ScrollPane didn't scroll.
Cause: ScrollWrapper had the wrong size, it was too big. It was taking the size of its child object (ScrollPane) instead of its parent object (ScrollWindow).
Solution:
dojox/layout/ScrollPane.js line 44: - dojo.style(this.wrapper,this._dir,this.domNode.style[this._dir]); - this._lo = dojo.coords(this.wrapper,true); + dojo.style(this.wrapper,this._dir,this.domNode.style[this._dir]); + dojo.style(this.wrapper,"width","100%"); + this._lo = dojo.coords(this.wrapper,true);
PS: This is how I'm building the ScrollPane (summarized). I do it this way because I need to put a StackController inside it.
// top_div is a Dom object that is already defined.
var scroll = new dojox.layout.ScrollPane({orientation:"horizontal"});
top_div.appendChild(scroll.domNode);
var stack_div = document.createElement("div");
stack_div.id = "Foo";
top_div.appendChild(stack_div);
// Make the StackController.
var container = document.createElement("div");
container.style.width = containerWidth(criteria); // Function defined earlier.
dojo.query(".dojoxScrollPane", scroll.domNode)[0].appendChild(container);
var controller = new dijit.layout.StackController({
containerId:stack_div.id
});
container.appendChild(controller.domNode);
controller.startup();
scroll.startup();
Change History
Note: See
TracTickets for help on using
tickets.