Opened 10 years ago

Closed 10 years ago

#9881 closed defect (fixed)

BorderContainer: newly added pane can't be resized

Reported by: rct Owned by: bill
Priority: high Milestone: 1.4
Component: Dijit Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:

Description

(split from #8469)

For what it's worth, The dijit test test_BorderContainer_prog.html included with the distribution shows this behavior on the left pane that is added programmatically. You can't move the left spiltter without a resize occuring.

To reproduce:

  1. load test_BorderContainer_prog.html
  2. Click "add left pane" button.
  3. Try to move the left splitter, note that you can't.
  4. resize the browser. 5. now you can move the left splitter.

Note, you see the same behavior, even if you click the button to remove the top pane (removeChild()). The borderContainer has been repainted, but the left splitter still is immobile until a browser resize.

Change History (4)

comment:1 Changed 10 years ago by bill

Reporter: changed from bill to rct

When the new pane is added, _computeSplitterThickness("left") isn't called, so this._splitterThicknessleft? isn't set.

Then when the user drags, _computeMaxSize() tries to reference that value and falls over.

For some reason addChild() is calling _layoutChildren() rather than layout(), which is why _computeSplitterThickness() isn't called.

comment:2 Changed 10 years ago by bill

Milestone: tbd1.5

comment:3 Changed 10 years ago by bill

Milestone: 1.51.4
Owner: changed from Adam Peller to bill
Status: newassigned

I've got a fix for this.

comment:4 Changed 10 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [20866]) BorderContainer fixes:

  1. Make addChild() call layout() rather than layoutChildren(), so that _computeSplitterThickness() is called (fixes #9881).
  2. Get rid of problematic dijit.layout._Splitter.oppNode parameter where (for example) the left splitter points to right child's domNode. oppNode sometimes had the wrong value (or no value), like when the right child didn't exist when the left splitter was initialized.
  3. Get rid of _recalc property to avoid similar problems, and also because it's an unnecessary optimization; calling computeMaxSize() each time the user drags a splitter is fine, and safer. Even moving by keystroke on IE6 seems fine. (fixes #9691)
  4. Get rid of this._maxSize and this._minSize and just use local variables

!strict

Note: See TracTickets for help on using tickets.