#10590 closed defect (fixed)
ComboButton: attr('value', 'newValue') resize failure (IE7)
Reported by: | Avachan | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 1.5 |
Component: | Dijit - Form | Version: | 1.4.0 |
Keywords: | ComboBox, attr('value'), resize | Cc: | |
Blocked By: | Blocking: |
Description (last modified by )
Hi,
I do not know if its a failure, but I think it should resize when I change the label.
Reproduce scenario: I create a ComboButton and give them a group to choose from it. When the User choose a point the ComboBox.attr('label') is set to the new label.
Failure: It sets the label. But if the label bigger in length as the one that are inserted before, the label is written above the button. The size of the button area of the button isn't resized to new size.
I don't have found a possible action to manually resize the button. So I think its a failure.
Sincerly, Ava-chan
Attachments (1)
Change History (8)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Ok .... append :
U must resize the button with the width everytime you change the attr('label','something new');
Than it works, if u don't reset the .style.width it doesn't affect the button.
Sincerly, Ava-chan
comment:3 Changed 11 years ago by
Description: | modified (diff) |
---|---|
Owner: | set to Douglas Hays |
Summary: | dijit.form.ComboButton.attr('value', 'newValue') resize Failure → ComboButton: attr('value', 'newValue') resize failure (IE7) |
postCreate() has some code from [17678] to handle a sizing quirk with IE7 margins/padding:
if(isIE && (isIE < 8 || dojo.isQuirks)){ // fixed in IE8/strict with(this.titleNode){ // resize BUTTON tag so parent TD won't inherit extra padding style.width = scrollWidth + "px"; this.connect(this.titleNode, "onresize", function(){ setTimeout( function(){ style.width = scrollWidth + "px"; }, 0); }); } }
Actually it's the same code you posted above.
I see the onresize handler firing in the case when the "change labels" button is pressed in test_Button.html (I added a console.log()), and further I'm not seeing a width problem, although I am seeing a height problem... can you attach your test case?
comment:4 Changed 11 years ago by
Ok ... in my test (don't know why yesterday was a bad day ) it do it in FF3.5 Chrome but in IE7 (not the above failure) it make the button bigger if needed (thats goood, don't know why it doesn't in my programm, so I use the workaround). But it did not make it smaler if I load a smaller label.
Sincerly Ava-chan
TestCase? I have uploaded to Attached Files, dojoroot must adjusted.
Changed 11 years ago by
Attachment: | combobuttonbug.php added |
---|
Testcase 4 combobutton don't get smaller by small label
comment:5 Changed 11 years ago by
Milestone: | tbd → 1.5 |
---|---|
Status: | new → assigned |
comment:6 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [21298]) Fixes #10590. Added custom _setLabelAttr for IE to resize the ComboButton?. Added automated test.
comment:7 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
Oh sorry for my mistake to forget the browser Version. I use Internet Explorer 7
I also found a resolution to prevent this failure:
These Lines Produce it, from dijit/form/Button.js. U can prevent it if u set the size one time to such big as they want, so in Code:
I don't change my button.js because I don't know if other classes be effected from this. Also I don't know if in other browsers these failure comes too. But in IE 7 it is there.
Sincerly, Ava-chan
PS: Sry for my bad english its not my native language.