Implemented fix that should solve issues in all the 3 cases ICE-2821, ICE-2822 and ICE-3003.
The dimension of the 1st pane is specified as a %, while the dimension of the 2nd pane is specified as a dynamically calculated no. of pixels. The calculation occurs in these events:
- component load
- divider drag and drop
- window resize
Since there is no way to determine the exact no. of pixels in the padding, scrollbar, border, margin and margin collapsing, we have to make certain assumptions:
- no padding in parent container div (not the one corresponding to the <panelDivider> tag, but the one created internally below that)
- no margin in 1st pane and divider
- no padding, border or margin in 2nd pane
However, all the spacing and bordering can be simulated using divs containing the component or nested inside the panes.
Note that offsetWidth includes the scrollbar width if a scrollbar is present, therefore (offsetWidth - clientWidth) doesn't always give you the border width.
Firefox sometimes wraps the right pane around even though the pane should fit exactly in the container, therefore we have to leave a one pixel gap on the right. (Couldn't find a way to fix these after many tries. IE works fine in the many tests done so far.)
There may be more than one divider panel on the same page, therefore on loading we need to remember not just one, but all of them for the window resize event handler.
This fix causes a regression for
ICE-2821which needs to be resolved.