PDA

View Full Version : [DEFER-1207] Slider in panel with collapsed:true make slider weird



mitch_feaster
13 Aug 2010, 3:27 PM
Ext version tested:

Ext 3.2.1


Adapter used:

ext


css used:

only default ext-all.css




Browser versions tested against:

Chrome
FF3 (firebug 1.5.4 installed)


Operating System:

Linux (Ubuntu 10.04)


Description:

When an Ext.Slider is placed in a panel which has config collapsed:true the slider handles get goofed up. With just one handle the 0 value becomes slightly offset. With two handles they each start at the same position (at the same place as when there's just one handle) and when you move one the other tries to move itself over to the other one. Similarly for three...


Test Case:



<html>
<head>
<link rel="stylesheet" href="http://extjs-public.googlecode.com/svn/tags/extjs-3.2.1/release/resources/css/ext-all.css" type="text/css" media="screen" />
<script type="text/javascript" src="http://extjs-public.googlecode.com/svn/tags/extjs-3.2.1/release/adapter/ext/ext-base-debug.js"></script>
<script type="text/javascript" src="http://extjs-public.googlecode.com/svn/tags/extjs-3.2.1/release/ext-all-debug.js"></script>

<script type="text/javascript">
Ext.ns('bug');

bug.zoom_top = 100;
bug.zoom_bottom = 0;

// zoom slider:
bug.zoom_slider = new Ext.Slider({
fieldLabel: 'Zoom Level'
,width: 300
,increment: 1
,minValue: 0
,maxValue: 100
,values: [0, 100]
});

bug.mypanel = new Ext.Panel({
title: 'Some Controls'
,height: 'auto'
,frame: true
,items: new Ext.form.FormPanel({
width: 600
,items: [{
xtype: 'fieldset'
,title: 'Range Controls'
,collapsible: true
,collapsed: true
,items: [{
xtype: 'fieldset'
,title: 'Zoom in Even Further'
,items: bug.zoom_slider
}]
}]
})
});


Ext.onReady(function() {
bug.mypanel.render('panel-area');
});

</script>

</head>
<body>

hello, world

<div id="panel-area"></div>

</body>
</html>



Copy/paste the code into an html file and open it.


Steps to reproduce the problem:

Load the page
Expand the panel
Behold the goofiness
Slide the handles a bit to observe the goofiness


The result that was expected:

Handles load in the correct place
Slide the handles around naturally


The result that occurs instead:

Handles load in a weird place
The handles try to lay on top of each other


Screenshot:

attached


Debugging already done:

Confirmed that configuring the panel with collapsed:true produces the bug, but collapsed:false is normal.


Possible fix:

not provided

Jamie Avins
16 Aug 2010, 9:59 AM
Thank you for the report.

evant
19 Sep 2010, 11:48 PM
Will be a bit difficult to solve now, probably something we'll target for 4.x. In the interim, you can use hideMode: 'offsets' on the fieldset to work around this behaviour.